forked from minetest-mods/mesecons
Fix a bug in which the wrong node was being checked for.
This commit is contained in:
parent
f221aeb066
commit
c0eb0982aa
|
@ -38,7 +38,7 @@ mesecon:register_on_signal_on(function(pos, node)
|
||||||
if lnode.name=="air" then set_node_on({x=pos.x, y=pos.y, z=pos.z-2}) end
|
if lnode.name=="air" then set_node_on({x=pos.x, y=pos.y, z=pos.z-2}) end
|
||||||
|
|
||||||
lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away
|
lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away
|
||||||
if lnode.name=="air" then set_node_on({x=pos.x-2, y=pos.y, z=pos.z+2}) end
|
if lnode.name=="air" then set_node_on({x=pos.x, y=pos.y, z=pos.z+2}) end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ mesecon:register_on_signal_off(function(pos, node)
|
||||||
if lnode.name=="air" then set_node_off({x=pos.x, y=pos.y, z=pos.z-2}) end
|
if lnode.name=="air" then set_node_off({x=pos.x, y=pos.y, z=pos.z-2}) end
|
||||||
|
|
||||||
lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away
|
lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away
|
||||||
if lnode.name=="air" then set_node_off({x=pos.x-2, y=pos.y, z=pos.z+2}) end
|
if lnode.name=="air" then set_node_off({x=pos.x, y=pos.y, z=pos.z+2}) end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||||
if lnode.name=="air" then set_node_deactivated({x=pos.x, y=pos.y, z=pos.z-2}) end
|
if lnode.name=="air" then set_node_deactivated({x=pos.x, y=pos.y, z=pos.z-2}) end
|
||||||
|
|
||||||
lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away
|
lnode = minetest.env:get_node({x=pos.x, y=pos.y, z=pos.z+1}) --a node between this node and the one two nodes away
|
||||||
if lnode.name=="air" then set_node_deactivated({x=pos.x-2, y=pos.y, z=pos.z+2}) end
|
if lnode.name=="air" then set_node_deactivated({x=pos.x, y=pos.y, z=pos.z+2}) end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user