diff options
author | rubenwardy <rubenwardy@gmail.com> | 2016-07-29 17:25:02 +0100 |
---|---|---|
committer | rubenwardy <rubenwardy@gmail.com> | 2016-07-29 17:25:02 +0100 |
commit | 96746aaf1e2c2c07dccafd9a6cebdbb15914ee98 (patch) | |
tree | 4e65b11a539d8ce28ba1f22571d47c5400c8bdab /readme.md | |
parent | f430b4eb6852afed312357a26a1d7ff96da7c65e (diff) |
Add awards.increment_item_counter() and use it
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -36,6 +36,12 @@ old fork in Carbone, under same license. * table_func is called if the trigger is a table - simply return an award name to unlock it * See triggers.lua for examples +* awards.increment_item_counter(data, field, itemname) + * add to an item's statistic count + * for example, (data, "place", "default:stone") will add 1 to the number of + times default:stone has been placed. + * data is the player's award data, ie: awards.players[player_name] + * returns true on success, false on failure (eg: cannot get modname and item from itemname) * awards.register_on_unlock(func(name, def)) * name is the player name * def is the award def. |