1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-18 16:20:38 +01:00
server-nalc/mods/pclasses
LeMagnesium 6b7b073cd9 Fixed pclasses' reservation system
- Moved callbacks call when setting class
 - Fixed reservation system
2015-07-30 23:37:25 +02:00
..
sounds Added pclasses' sound and hunter's reserved items 2015-07-25 21:02:27 +02:00
admin.lua Updated pclasses with admin class 2015-07-28 16:17:26 +02:00
adventurer.lua Chmod and removal of whitespaces 2015-07-27 21:45:41 +02:00
api.lua Fixed pclasses' reservation system 2015-07-30 23:37:25 +02:00
depends.txt Add a first completed version of the armor set 'Black Mithril' 2015-07-27 00:11:54 +02:00
hunter.lua Added mithril arrows in hunters' reserved items 2015-07-29 19:52:04 +02:00
init.lua Fixed pclasses' reservation system 2015-07-30 23:37:25 +02:00
README.md Added skeleton of pclasses 2015-07-15 17:08:22 +02:00
warrior.lua Get back blackmithril shield 2015-07-28 19:01:38 +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