summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorFernando Carmona Varo <ferkiwi@gmail.com>2015-10-21 22:22:58 +0200
committerFernando Carmona Varo <ferkiwi@gmail.com>2015-10-21 22:22:58 +0200
commit6ea7381e9f0fd639f87de33cad6d9497c0c83888 (patch)
tree064bc665ee053ba8634f41afcbcf4d4e678e151e /init.lua
parent6d338337d362af15f1038cf73ca154daa57b6b2b (diff)
Added power pellet state, ghosts will run away from the player and get teleported to the ghost spawn
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 2ef6f29..cc45f7e 100644
--- a/init.lua
+++ b/init.lua
@@ -64,7 +64,9 @@ minetest.register_node("mypacman:pellet_2", {
{-0.6875, -0.1875, -0.1875, -0.3125, 0.1875, 0.1875},
}
},
- on_destruct = function(pos)
+ after_dig_node = function(pos, oldnode, oldmetadata, digger)
+ mypacman.on_player_got_power_pellet(digger)
+
minetest.sound_play("mypacman_eatfruit", {
pos = pos,
max_hear_distance = 100,