diff --git a/mesecons/mesecons_mvps/init.lua b/mesecons/mesecons_mvps/init.lua index b8abdd7..7b76559 100644 --- a/mesecons/mesecons_mvps/init.lua +++ b/mesecons/mesecons_mvps/init.lua @@ -145,6 +145,10 @@ function mesecon.mvps_pull_single(pos, dir, maximum) return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum) end +function mesecon.mvps_is_protected(pos, ...) + return false +end + -- pos: pos of mvps; stackdir: direction of building the stack -- movedir: direction of actual movement -- maximum: maximum nodes to be pushed @@ -159,7 +163,13 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sti return end end - + + for _, n in ipairs(nodes) do + if mesecon.mvps_is_protected(n.pos) then + return + end + end + -- remove all nodes for _, n in ipairs(nodes) do n.meta = minetest.get_meta(n.pos):to_table()