milan2018_v2 #27

Closed
milan wants to merge 66 commits from milan2018_v2 into master
Showing only changes of commit af2974bf9f - Show all commits

View file

@ -70,6 +70,7 @@ function mesecon.mvps_get_stack(pos, dir, maximum, all_pull_sticky)
while #frontiers > 0 do
local np = frontiers[1]
local nn = minetest.get_node(np)
if nn.name == "ignore" then return nil end
if not node_replaceable(nn.name) then
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
local adjpos = vector.add(np, r)
local adjnode = minetest.get_node(adjpos)
if adjnode.name == "ignore" then return nil end
if minetest.registered_nodes[adjnode.name]
and minetest.registered_nodes[adjnode.name].mvps_sticky then
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
-- determine if one of the nodes blocks the push / pull
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
end
end