mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-09-12 07:58:32 +02:00
Fix whitespace, simplify node updating.
This commit is contained in:
parent
208e95c2ff
commit
cd8fd55fe3
@ -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)
|
||||
@ -214,7 +211,5 @@ mesecon:register_on_signal_off(function(pos, node)
|
||||
mesecon:updatenode(pos)
|
||||
end
|
||||
end
|
||||
if node.name == "mesecons_pistons:piston_down_sticky" then
|
||||
nodeupdate(pos)
|
||||
end
|
||||
end)
|
||||
|
@ -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)
|
||||
@ -202,7 +199,5 @@ mesecon:register_on_signal_off(function(pos, node)
|
||||
mesecon:updatenode(pos)
|
||||
end
|
||||
end
|
||||
if node.name == "mesecons_pistons:piston_up_sticky" then
|
||||
nodeupdate(pos)
|
||||
end
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user