diff options
author | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-11-07 10:27:05 +0100 |
---|---|---|
committer | Fernando Carmona Varo <ferkiwi@gmail.com> | 2015-11-07 10:27:05 +0100 |
commit | aeaca5d7494efe55767c997181a5c071c4800c43 (patch) | |
tree | 8ea473837f6efed03c5c5ec63639b0e3042272fe /pacmine/init.lua | |
parent | 234cac868e1baf2089ef255d0751a7e288725db5 (diff) |
Some refactoring for the on_player_collision
Diffstat (limited to 'pacmine/init.lua')
-rw-r--r-- | pacmine/init.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pacmine/init.lua b/pacmine/init.lua index 53fbb53..5e8823b 100644 --- a/pacmine/init.lua +++ b/pacmine/init.lua @@ -35,6 +35,10 @@ minetest.register_node("pacmine:pellet_1", { {0, 0, 0, 0, 0, 0}, } }, + on_player_collision = function(pos, player, gameid) + minetest.remove_node(pos) + pacmine.on_player_got_pellet(player) + end }) --Power Pellets. Need to make these do something @@ -68,6 +72,10 @@ minetest.register_node("pacmine:pellet_2", { {0, 0, 0, 0, 0, 0}, } }, + on_player_collision = function(pos, player, gameid) + minetest.remove_node(pos) + pacmine.on_player_got_power_pellet(player) + end }) --The placer block for pacmine |