1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-09-14 08:40:23 +02:00
server-nalc/mods/pclasses
LeMagnesium 6d63e415b1 Added holographic entity and pedestals as switch 'orbs'
- Modified class orb to be pedestals with floating entity above
2015-08-14 17:38:09 +02:00
..
textures Added automated arbalest to throwing mod 2015-08-11 12:02:43 +02:00
adventurer.lua [pclasses] Remove active detection, introduce class switch orbs 2015-07-31 21:48:37 +02:00
api.lua Prevent crashes 2015-08-01 23:55:44 +02:00
depends.txt Add a first completed version of the armor set 'Black Mithril' 2015-07-27 00:11:54 +02:00
init.lua Static graveyard inventory 2015-08-01 19:26:50 +02:00
inventory.lua Added grave button texture and reduced lag when vacuuming graves 2015-08-02 21:25:31 +02:00
nodes.lua Added holographic entity and pedestals as switch 'orbs' 2015-08-14 17:38:09 +02:00
README.md Added skeleton of pclasses 2015-07-15 17:08:22 +02:00

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.classes

  • All classes and their specs

pclasses.datas

  • Miscellaneous datas

pclasses.datas.players

  • List of all players' class. Index is player's name and value is the class's name

pclasses.datas.hud_ids

  • Surely useful in the future with a hypothetical hud to show current class

Functions

pclasses.api.create_class_id

  • Arguments : None
  • Indicates the next free id/index in the classes' table

pclasses.api.id_for_class

  • Arguments : cname (class' name)
  • Returns the id/index corresponding the class in the classes' table
  • Returns 0 if not found, nil if no name given

pclasses.api.register_class(cname)

  • Argument : cname
  • Registers a class in the classes' table
  • Pretty useless at the moment
  • Returns class' id or nil if any error

pclasses.api.get_class_by_id

  • Argument : id
  • Return the class' specs (table) corresponding an id or nil when not found

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