diff options
author | Rubenwardy <anjayward@gmail.com> | 2013-02-22 18:38:09 +0000 |
---|---|---|
committer | Rubenwardy <anjayward@gmail.com> | 2013-02-22 18:38:09 +0000 |
commit | 369b4d147575a1525ba81dd691394dad08ea34d6 (patch) | |
tree | 0e82f129c5c278d3c1b8dabc90fc3de06c9e2700 /init.lua | |
parent | 7d8aec2423636bf2e3f5cfa2bccbf2d42a777388 (diff) |
completed ondig function
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -21,12 +21,8 @@ function awards.register_achievement(name,data_table) table.insert(awards.def,data_table); end -function awards.register_onDig(data) - table.insert(awards.onDig,data); -end - -function awards:getNodeCount(nodeName) - return self.count[nodeName] +function awards.register_onDig(func) + table.insert(awards.onDig,func); end @@ -36,9 +32,12 @@ awards.register_achievement("award_mesefind",{ description = "Found some Mese!", }) -awards.register_onDig({ - award="", - func=function(player) +awards.register_onDig(function(player,data) + if not data['count']['default'] or not data['count']['default']['mese'] then + return + end + if data['count']['default']['mese'] > 0 then + return "award_mesefind" end -})
\ No newline at end of file +end)
\ No newline at end of file |