forked from minetest-mods/mesecons
Remove redundant on_placenode calls after movement (#586)
This commit is contained in:
parent
4c5b13a347
commit
c9dd323207
@ -47,10 +47,8 @@ local function on_mvps_move(moved_nodes)
|
|||||||
end
|
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 )
|
-- This function is kept for compatibility.
|
||||||
for _, n in ipairs(stack) do
|
-- It used to call on_placenode on the moved nodes, but that is now done automatically.
|
||||||
mesecon.on_placenode(n.pos, minetest.get_node(n.pos))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- tests if the node can be pushed into, e.g. air, water, grass
|
-- tests if the node can be pushed into, e.g. air, water, grass
|
||||||
|
@ -93,7 +93,6 @@ local piston_on = function(pos, node)
|
|||||||
minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.onname})
|
minetest.swap_node(pos, {param2 = node.param2, name = pistonspec.onname})
|
||||||
minetest.set_node(pusher_pos, {param2 = node.param2, name = pistonspec.pusher})
|
minetest.set_node(pusher_pos, {param2 = node.param2, name = pistonspec.pusher})
|
||||||
minetest.sound_play("piston_extend", { pos = pos, max_hear_distance = 20, gain = 0.3 }, true)
|
minetest.sound_play("piston_extend", { pos = pos, max_hear_distance = 20, gain = 0.3 }, true)
|
||||||
mesecon.mvps_process_stack(stack)
|
|
||||||
mesecon.mvps_move_objects(pusher_pos, dir, oldstack)
|
mesecon.mvps_move_objects(pusher_pos, dir, oldstack)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user