summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesecons_pistons/pistons_down.lua13
-rw-r--r--mesecons_pistons/pistons_up.lua13
2 files changed, 8 insertions, 18 deletions
diff --git a/mesecons_pistons/pistons_down.lua b/mesecons_pistons/pistons_down.lua
index e8dada5..701f247 100644
--- a/mesecons_pistons/pistons_down.lua
+++ b/mesecons_pistons/pistons_down.lua
@@ -198,9 +198,6 @@ mesecon:register_on_signal_off(function(pos, node)
--retract piston
minetest.env:remove_node(pos) --remove pusher
- if node.name ~= "mesecons_pistons:piston_down_sticky" then
- nodeupdate(pos)
- end
if node.name == "mesecons_pistons:piston_down_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)
@@ -209,12 +206,10 @@ mesecon:register_on_signal_off(function(pos, node)
and minetest.registered_nodes[checknode.name].liquidtype == "none"
and not mesecon:is_mvps_stopper(checknode.name) then
minetest.env:remove_node(checkpos)
- mesecon:updatenode(checkpos)
- minetest.env:set_node(pos, checknode)
- mesecon:updatenode(pos)
+ mesecon:updatenode(checkpos)
+ minetest.env:set_node(pos, checknode)
+ mesecon:updatenode(pos)
end
end
- if node.name == "mesecons_pistons:piston_down_sticky" then
- nodeupdate(pos)
- end
+ nodeupdate(pos)
end)
diff --git a/mesecons_pistons/pistons_up.lua b/mesecons_pistons/pistons_up.lua
index 9002068..d04bdee 100644
--- a/mesecons_pistons/pistons_up.lua
+++ b/mesecons_pistons/pistons_up.lua
@@ -186,9 +186,6 @@ mesecon:register_on_signal_off(function(pos, node)
--retract piston
minetest.env:remove_node(pos) --remove pusher
- if node.name ~= "mesecons_pistons:piston_up_sticky" then
- nodeupdate(pos)
- end
if node.name == "mesecons_pistons:piston_up_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)
@@ -197,12 +194,10 @@ mesecon:register_on_signal_off(function(pos, node)
and minetest.registered_nodes[checknode.name].liquidtype == "none"
and not mesecon:is_mvps_stopper(checknode.name) then
minetest.env:remove_node(checkpos)
- mesecon:updatenode(checkpos)
- minetest.env:set_node(pos, checknode)
- mesecon:updatenode(pos)
+ mesecon:updatenode(checkpos)
+ minetest.env:set_node(pos, checknode)
+ mesecon:updatenode(pos)
end
end
- if node.name == "mesecons_pistons:piston_up_sticky" then
- nodeupdate(pos)
- end
+ nodeupdate(pos)
end)