1
0
mirror of https://gitlab.com/rubenwardy/awards.git synced 2025-06-29 22:50:36 +02:00

completed ondig function

This commit is contained in:
Rubenwardy
2013-02-22 18:38:09 +00:00
parent 7d8aec2423
commit 369b4d1475
2 changed files with 51 additions and 36 deletions

View File

@ -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
end)