mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-08-14 20:10:25 +02:00
minetestforfun_game
mods
3d_armor
3d_armor_classes
WorldEdit
_misc
action_timers
ambience
areas
arrow_signs
automappercolors
bakedclay
biome_lib
bobblocks
bonemeal
broomstick
builtin_falling
builtin_item
camera
cherry_tree
chesttools
christmas_craft
claycrafter
coloredwood
colormachine
colouredstonebricks
columnia
connected_chests
cotton
cozy
creeper
darkage
death_messages
diet
digilines
email
enchanting
eventobjects
factions
fail
farming
fences
fishing
food
food_sweet
framedglass
gauges
glow
h2omes
hbarmor
hbhunger
homedecor_modpack
hudbars
interact
inventory_icon
inventorycheck
invtweak
irc_modpack
item_drop
jumping
kpgmobs
lantern
lavatemple
lightning
locked_sign
maidroid
mana
mapfix
maptools
markers
maze
meru
mesecons
metatools
mff
minercantile
mob_horse
mobs
mobs_animal
mobs_monster
mobs_water
money
more_chests
moreblocks
morefarming
moreflowers
moreores
moreplants
moretrees
mtfoods
multitest
music
mysql_auth
nalc
name_restrictions
names_per_ip
nether
news
notice
nyancat
paintings
pclasses
textures
README.md
adventurer.lua
api.lua
depends.txt
init.lua
inventory.lua
nodes.lua
pdisc
peace_areas
pipeworks
plantlife_modpack
player_inactive
player_physics
playeranim
playereffects
pmobs
profilerdumper
profnsched
quartz
quests
random_messages
report
returnmirror
riesenpilz
runes
sea
serverguide
shutdown
signs_lib
slimes
snow
soccer
soundset
spears
sponge
sprint
stacktraceplus
stained_glass
technic
throwing
time_regulation
tnt
toolranks
track_players
treasurer
trm_pyramids
tsm_pyramids
u_skins
unified_inventory
unifieddyes
vector_extras
warps
weather_pack
whoison
witchcraft
worldedge
xban2
zombie
other_things
worlds
.gitignore
.gitmodules
LICENSE
README.md
minetest.conf
fix wrong stamina value to hunter remove old call of function, moved to assign api
Player Classes
Yet another class mod for Minetest.
TODO
- Flush and read system for
pclasses.datas.players
Namespaces
pclasses
- All our stuff
pclasses.api
- All functions used to declare, get, set classes
pclasses.api.util
- Some utility functions
pclasses.conf
- Some configuration values
pclasses.classes
- All classes and their specs
pclasses.data
- Miscellaneous data
pclasses.data.players
- List of all players' class. Index is player's name and value is the class's name
pclasses.data.hud_ids
- Surely useful in the future with a hypothetical hud to show current class
Functions
pclasses.api.register_class
- Arguments : cname, def
- Registers a class and its specifications
- Def is a definition table that can contain many functions/values :
on_assigned
which is a function, receiving as argument the player nameon_unassigned
which is a function, receiving as argument the player nameon_update
which is a function, receiving as argument the player nameswitch_params
, which is a table, containing parameters for the switch pedestal :holo_item
is mandatory. It's the itemstring of the item to be put over the pedestalcolor
is optional. Default is white. It's a RGB table.tile
is optional. Default is none. It's a string of the texture to be applied over the pedestal
pclasses.register_class_switch
- Arguments : cname, params
- Used internally to create switch pedestals
params
is thedef
table given topclasses.api.register_class
, documented above
pclasses.api.get_class_by_name
- Argument : cname
- Return the class' specs (table) corresponding a class name or nil if not found
pclasses.api.get_player_class
- Argument : pname (player's name)
- Return the player's current class' name
pclasses.api.get_class_players
- Argument : cname
- Return a list (table) of all players with class cname
pclasses.api.set_player_class
- Arguments : pname, cname
- Assign a player the cname class
- Returns true if achieved, false if not
pclasses.api.util.does_wear_full_armor
- Arguments : pname, material, noshield
- Returns true if player
pname
is wearing the full armor made out ofmaterial
noshield
must be true when the full armor has no shield
pclasses.api.util.can_have_item
- Arguments : pname, itemname
- Returns true if player
pname
can have itemsitemstring
in his main inventory, according to his class
pclasses.api.util.on_update
- Arguments : pname
- Update player's stats
pclasses.api.reserve_item
- Arguments : cname, itemstring
- Adds an entry in the reserved items' table. Players will need to belong to class
cname
in order to have itemsitemstring
in their main inventory - Note : You can reserve the same item for two classes, any player of either of both can then have the item
pclasses.api.create_graveyard_inventory
- Argument : player
- Creates a detached inventory dedicated to 'dead' items (confiscated reserved items)
- Used internally, should not be used outside of pclasses
pclasses.api.vacuum_graveyard
- Argument : player
- Check all of
player
's graveyard inventory to get them back items they obtained to right to have