diff options
author | sfan5 <sfan5@live.de> | 2012-08-08 11:44:12 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2012-08-08 11:44:12 +0200 |
commit | 55e74c04ed0bcccd4b5cbd02e625202598ab0f65 (patch) | |
tree | 673ee4ee58a2a932319f1c06c98c8e0383f06908 | |
parent | 98fc808c68a2008d4df14cf43a8416e6661a39f6 (diff) | |
download | mesecons-55e74c04ed0bcccd4b5cbd02e625202598ab0f65.tar mesecons-55e74c04ed0bcccd4b5cbd02e625202598ab0f65.tar.gz mesecons-55e74c04ed0bcccd4b5cbd02e625202598ab0f65.tar.bz2 mesecons-55e74c04ed0bcccd4b5cbd02e625202598ab0f65.tar.xz mesecons-55e74c04ed0bcccd4b5cbd02e625202598ab0f65.zip |
Trigger Block Update when retracting Piston
-rw-r--r-- | mesecons_pistons/init.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesecons_pistons/init.lua b/mesecons_pistons/init.lua index ccb5630..73cb119 100644 --- a/mesecons_pistons/init.lua +++ b/mesecons_pistons/init.lua @@ -171,7 +171,7 @@ mesecon:register_on_signal_on(function(pos, node) end end) ---Pull action (sticky only) +--Pull action mesecon:register_on_signal_off(function(pos, node) if node.name ~= "mesecons_pistons:piston_normal" and node.name ~= "mesecons_pistons:piston_sticky" then return @@ -191,6 +191,9 @@ mesecon:register_on_signal_off(function(pos, node) --retract piston minetest.env:remove_node(pos) --remove pusher + if node.name ~= "mesecons_pistons:piston_sticky" then + nodeupdate(pos) + end if node.name == "mesecons_pistons:piston_sticky" then --retract block local checkpos = {x=pos.x + dir.x, y=pos.y + dir.y, z=pos.z + dir.z} --move to the node to be retracted checknode = minetest.env:get_node(checkpos) @@ -205,6 +208,9 @@ mesecon:register_on_signal_off(function(pos, node) minetest.env:dig_node(checkpos) end end + if node.name == "mesecons_pistons:piston_sticky" then + nodeupdate(pos) + end end) -- get push direction |