awards/readme.md

42 lines
895 B
Markdown
Raw Normal View History

2013-02-22 18:53:42 +01:00
Awards
------
by Andrew "Rubenwardy" Ward, CC-BY-SA.
This mod adds achievements to Minetest.
Code Reference
--------------
The API
=======
* awards.register_achievement(name,data_table)
* name
* desciption
* sound [optional]
* image [optional]
2013-02-23 13:02:02 +01:00
* trigger [optional] [table]
* type - "dig" or "place"
* (for dig/place type) node - the nodes name
* (for dig/place type) target - how many to dig / place
2013-02-22 21:43:40 +01:00
* awards.give_achievement(name,award)
* -- gives an award to a player
2013-02-23 13:02:02 +01:00
* awards.register_onDig(func(player,data))
2013-02-22 21:43:40 +01:00
* -- return award name or null
2013-02-23 13:02:02 +01:00
* awards.register_onPlace(func(player,data))
2013-02-22 21:43:40 +01:00
* -- return award name or null
2013-02-22 18:53:42 +01:00
Player Data
===========
A list of data referenced/hashed by the player's name.
2013-02-23 13:02:02 +01:00
* player name
* name [string]
* count [table] - dig counter
* modname [table]
* itemname [int]
* place [table] - place counter
* modname [table]
* itemname [int]