diff options
author | rubenwardy <rubenwardy@gmail.com> | 2015-06-10 18:39:22 +0100 |
---|---|---|
committer | rubenwardy <rubenwardy@gmail.com> | 2016-07-29 16:00:58 +0100 |
commit | 87c04be9ea8cfd02c73ed9050e246884e5e026a7 (patch) | |
tree | cab789fe3cfb84a070e8b083080bff1139b2b796 /readme.md | |
parent | 85efc6704932898bf6c98ff5c043a989ce83f293 (diff) |
awards.register_trigger
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 34 |
1 files changed, 19 insertions, 15 deletions
@@ -1,5 +1,4 @@ -Awards ------- +# Awards by Andrew "Rubenwardy" Ward, LGPL 2.1 or later. @@ -9,40 +8,45 @@ Majority of awards are back ported from Calinou's old fork in Carbone, under same license. -Code Reference --------------- +# Basic API -The API -======= -* awards.register_achievement(name,data_table) +* awards.register_achievement(name, def) * name * desciption * sound [optional] - * image [optional] + * image [optional] - texture name, eg: award_one.png + * background [optional] - texture name, eg: award_one.png * trigger [optional] [table] * type - "dig", "place", "craft", "death", "chat" or "join" * (for dig/place type) node - the nodes name * (for craft type) item - the items name * (for all types) target - how many to dig / place + * See Triggers * secret [optional] - if true, then player needs to unlock to find out what it is. +* awards.register_trigger(name, func(awardname, def)) + * Note: awards.on[name] is automatically created for triggers * awards.give_achievement(name,award) * -- gives an award to a player -* awards.register_onDig(func(player,data)) + +# Included in the Mod + +## Triggers + +* awards.register_on_dig(func(player, data)) * -- return award name or null -* awards.register_onPlace(func(player,data)) +* awards.register_on_place(func(player, data)) * -- return award name or null -* awards.register_onDeath(func(player,data)) +* awards.register_on_death(func(player, data)) * -- return award name or null -* awards.register_onChat(func(player,data)) +* awards.register_on_chat(func(player, data)) * -- return award name or null -* awards.register_onJoin(func(player,data)) +* awards.register_on_join(func(player, data)) * -- return award name or null * awards.register_onCraft(func(player,data)) * -- return award name or null -Player Data -=========== +# Player Data A list of data referenced/hashed by the player's name. * player name |