mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-26 02:10:18 +01:00
Fix pistons not updating the nodes when placing them again.
This commit is contained in:
parent
fa0cf15cd9
commit
6efe579f68
@ -94,6 +94,11 @@ function mesecon:mvps_push(pos, dir, maximum) -- pos: pos of mvps; dir: directio
|
|||||||
nodes[i].pos = mesecon:addPosRule(nodes[i].pos, dir)
|
nodes[i].pos = mesecon:addPosRule(nodes[i].pos, dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for _, n in ipairs(nodes) do
|
||||||
|
mesecon.on_placenode(n.pos, n.node)
|
||||||
|
mesecon:update_autoconnect(n.pos)
|
||||||
|
end
|
||||||
|
|
||||||
return true, nodes, oldstack
|
return true, nodes, oldstack
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -112,6 +117,8 @@ function mesecon:mvps_pull_single(pos, dir) -- pos: pos of mvps; direction: dire
|
|||||||
nodeupdate(pos)
|
nodeupdate(pos)
|
||||||
mesecon.on_dignode(np, nn)
|
mesecon.on_dignode(np, nn)
|
||||||
mesecon:update_autoconnect(np)
|
mesecon:update_autoconnect(np)
|
||||||
|
mesecon:update_autoconnect(pos)
|
||||||
|
mesecon.on_placenode(pos, nn)
|
||||||
end
|
end
|
||||||
return {{pos = np, node = {param2 = 0, name = "air"}}, {pos = pos, node = nn}}
|
return {{pos = np, node = {param2 = 0, name = "air"}}, {pos = pos, node = nn}}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user