milan2018_v2 #25
1 changed files with 3 additions and 1 deletions
|
@ -70,6 +70,7 @@ function mesecon.mvps_get_stack(pos, dir, maximum, all_pull_sticky)
|
||||||
while #frontiers > 0 do
|
while #frontiers > 0 do
|
||||||
local np = frontiers[1]
|
local np = frontiers[1]
|
||||||
local nn = minetest.get_node(np)
|
local nn = minetest.get_node(np)
|
||||||
|
if nn.name == "ignore" then return nil end
|
||||||
|
|
||||||
if not node_replaceable(nn.name) then
|
if not node_replaceable(nn.name) then
|
||||||
table.insert(nodes, {node = nn, pos = np})
|
table.insert(nodes, {node = nn, pos = np})
|
||||||
|
@ -90,6 +91,7 @@ function mesecon.mvps_get_stack(pos, dir, maximum, all_pull_sticky)
|
||||||
for _, r in ipairs(mesecon.rules.alldirs) do
|
for _, r in ipairs(mesecon.rules.alldirs) do
|
||||||
local adjpos = vector.add(np, r)
|
local adjpos = vector.add(np, r)
|
||||||
local adjnode = minetest.get_node(adjpos)
|
local adjnode = minetest.get_node(adjpos)
|
||||||
|
if adjnode.name == "ignore" then return nil end
|
||||||
if minetest.registered_nodes[adjnode.name]
|
if minetest.registered_nodes[adjnode.name]
|
||||||
and minetest.registered_nodes[adjnode.name].mvps_sticky then
|
and minetest.registered_nodes[adjnode.name].mvps_sticky then
|
||||||
local sticksto = minetest.registered_nodes[adjnode.name]
|
local sticksto = minetest.registered_nodes[adjnode.name]
|
||||||
|
@ -155,7 +157,7 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, all_pull_sti
|
||||||
if not nodes then return end
|
if not nodes then return end
|
||||||
-- determine if one of the nodes blocks the push / pull
|
-- determine if one of the nodes blocks the push / pull
|
||||||
for id, n in ipairs(nodes) do
|
for id, n in ipairs(nodes) do
|
||||||
if mesecon.is_mvps_stopper(n.node, movedir, nodes, id) then
|
if mesecon.is_mvps_stopper(n.node, movedir, nodes, id) or minetest.is_protected(n.pos, "mvps") then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue