From d2f01c68f520913b487096fc2549fe2648a32a33 Mon Sep 17 00:00:00 2001 From: Bu-Gee Date: Tue, 13 Mar 2018 02:45:18 +0100 Subject: [PATCH] Pistons: When pushing a dropper node, dig it Instead of calling handle_node_drops, etc. --- mods/ITEMS/REDSTONE/mesecons_mvps/init.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua index 40d713eb..61cd234e 100644 --- a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua @@ -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) + minetest.dig_node(n.pos) + else + minetest.remove_node(n.pos) end - minetest.remove_node(n.pos) 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)