forked from Mirrorlandia_minetest/mesecons
Fix piston bug: up piston pushing sand won't drop the sand anymore
This commit is contained in:
parent
841bc70b97
commit
5c2959826e
@ -20,6 +20,7 @@ end
|
|||||||
function mesecon:mvps_process_stack(stack)
|
function mesecon:mvps_process_stack(stack)
|
||||||
-- update mesecons for placed nodes ( has to be done after all nodes have been added )
|
-- update mesecons for placed nodes ( has to be done after all nodes have been added )
|
||||||
for _, n in ipairs(stack) do
|
for _, n in ipairs(stack) do
|
||||||
|
nodeupdate(n.pos)
|
||||||
mesecon.on_placenode(n.pos, minetest.env:get_node(n.pos))
|
mesecon.on_placenode(n.pos, minetest.env:get_node(n.pos))
|
||||||
mesecon:update_autoconnect(n.pos)
|
mesecon:update_autoconnect(n.pos)
|
||||||
end
|
end
|
||||||
@ -57,7 +58,6 @@ function mesecon:mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio
|
|||||||
-- remove all nodes
|
-- remove all nodes
|
||||||
for _, n in ipairs(nodes) do
|
for _, n in ipairs(nodes) do
|
||||||
minetest.env:remove_node(n.pos)
|
minetest.env:remove_node(n.pos)
|
||||||
nodeupdate(n.pos)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- update mesecons for removed nodes ( has to be done after all nodes have been removed )
|
-- update mesecons for removed nodes ( has to be done after all nodes have been removed )
|
||||||
@ -70,7 +70,6 @@ function mesecon:mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio
|
|||||||
for _, n in ipairs(nodes) do
|
for _, n in ipairs(nodes) do
|
||||||
np = mesecon:addPosRule(n.pos, dir)
|
np = mesecon:addPosRule(n.pos, dir)
|
||||||
minetest.env:add_node(np, n.node)
|
minetest.env:add_node(np, n.node)
|
||||||
nodeupdate(np)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
for i in ipairs(nodes) do
|
for i in ipairs(nodes) do
|
||||||
|
Loading…
Reference in New Issue
Block a user