mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
Pistons: When pushing a dropper node, dig it
Instead of calling handle_node_drops, etc.
This commit is contained in:
parent
e19271398d
commit
d2f01c68f5
@ -218,10 +218,10 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sti
|
||||
local is_dropper = mesecon.is_mvps_dropper(n.node, movedir, nodes, id)
|
||||
if is_dropper then
|
||||
local drops = minetest.get_node_drops(n.node.name, "")
|
||||
local droppos = vector.add(n.pos, movedir)
|
||||
minetest.handle_node_drops(droppos, drops, nil)
|
||||
end
|
||||
minetest.dig_node(n.pos)
|
||||
else
|
||||
minetest.remove_node(n.pos)
|
||||
end
|
||||
if is_dropper then
|
||||
first_dropper = id
|
||||
break
|
||||
@ -256,6 +256,9 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sti
|
||||
local moved_nodes = {}
|
||||
local oldstack = mesecon.tablecopy(nodes)
|
||||
for i in ipairs(nodes) do
|
||||
if first_dropper and i >= first_dropper then
|
||||
break
|
||||
end
|
||||
moved_nodes[i] = {}
|
||||
moved_nodes[i].oldpos = nodes[i].pos
|
||||
nodes[i].pos = vector.add(nodes[i].pos, movedir)
|
||||
|
Loading…
Reference in New Issue
Block a user