diff options
author | Rubenwardy <anjayward@gmail.com> | 2013-02-23 15:13:21 +0000 |
---|---|---|
committer | Rubenwardy <anjayward@gmail.com> | 2013-02-23 15:13:21 +0000 |
commit | 4cf05cbc47b5ddab616170097673947d69e93a29 (patch) | |
tree | 345fc723d8a7797e2021b577578e9996b4065805 /api.lua | |
parent | 6b031a601d7ba394b61bcbce73c569a74625a913 (diff) |
add onDeath
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -46,6 +46,12 @@ function awards.register_achievement(name,data_table) target=data_table['trigger']['target'], } table.insert(awards.onPlace,tmp) + elseif data_table['trigger']['type']=="death" then + local tmp={ + award=name, + target=data_table['trigger']['target'], + } + table.insert(awards.onDeath,tmp) end end @@ -60,6 +66,10 @@ function awards.register_onPlace(func) table.insert(awards.onPlace,func); end +function awards.register_onDeath(func) + table.insert(awards.onDeath,func); +end + function awards.give_achievement(name,award) local data=player_data[name] |