diff options
author | Rubenwardy <anjayward@gmail.com> | 2013-02-22 18:03:32 +0000 |
---|---|---|
committer | Rubenwardy <anjayward@gmail.com> | 2013-02-22 18:03:32 +0000 |
commit | 7d8aec2423636bf2e3f5cfa2bccbf2d42a777388 (patch) | |
tree | a382b2bae6d1469596f2748883ca08ab8fcf5885 | |
parent | fe374e28d0144eec72d4f1515773d0a178a3a33e (diff) |
onDig works!
-rw-r--r-- | triggers.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/triggers.lua b/triggers.lua index 2c9492a..a2074f8 100644 --- a/triggers.lua +++ b/triggers.lua @@ -14,8 +14,12 @@ awards.onTick={} minetest.register_on_dignode(function(pos, oldnode, digger) local nodedug = string.split(oldnode.name, ":") - local mod=nodedug[0] - local item=nodedug[1] + local mod=nodedug[1] + local item=nodedug[2] + + + print (mod) + print (item) local player = digger:get_player_name() @@ -39,6 +43,8 @@ minetest.register_on_dignode(function(pos, oldnode, digger) end player_data[player]['count'][mod][item]=player_data[player]['count'][mod][item]+1 + + print(mod..":"..item.." 's count is now "..(player_data[player]['count'][mod][item])) else print(player.."'s dig event has been skipped") end |