Změnit "mesecons/mesecons_mvps/init.lua"
This commit is contained in:
parent
4eaa92384c
commit
c28d6f3dc2
1 changed files with 11 additions and 1 deletions
|
@ -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)
|
return mesecon.mvps_push_or_pull(pos, vector.multiply(dir, -1), dir, maximum)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mesecon.mvps_is_protected(pos, ...)
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
-- pos: pos of mvps; stackdir: direction of building the stack
|
-- pos: pos of mvps; stackdir: direction of building the stack
|
||||||
-- movedir: direction of actual movement
|
-- movedir: direction of actual movement
|
||||||
-- maximum: maximum nodes to be pushed
|
-- maximum: maximum nodes to be pushed
|
||||||
|
@ -159,7 +163,13 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sti
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
for _, n in ipairs(nodes) do
|
||||||
|
if mesecon.mvps_is_protected(n.pos) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- remove all nodes
|
-- remove all nodes
|
||||||
for _, n in ipairs(nodes) do
|
for _, n in ipairs(nodes) do
|
||||||
n.meta = minetest.get_meta(n.pos):to_table()
|
n.meta = minetest.get_meta(n.pos):to_table()
|
||||||
|
|
Loading…
Reference in a new issue