Improve area protection check
This commit is contained in:
parent
82444021a9
commit
b3ddc91489
@ -179,7 +179,7 @@ local function exchange_nodes(pos, nvm, slot)
|
|||||||
|
|
||||||
for idx = (slot or 1), (slot or 16) do
|
for idx = (slot or 1), (slot or 16) do
|
||||||
local pos = nvm.pos_list[idx]
|
local pos = nvm.pos_list[idx]
|
||||||
if pos and not minetest.is_protected(pos, owner) then
|
if pos then
|
||||||
item_list[idx], nvm.param2_list[idx] = exchange_node(pos, item_list[idx], nvm.param2_list[idx])
|
item_list[idx], nvm.param2_list[idx] = exchange_node(pos, item_list[idx], nvm.param2_list[idx])
|
||||||
res = true
|
res = true
|
||||||
end
|
end
|
||||||
@ -381,8 +381,10 @@ minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not minetest.is_protected(pointed_thing.under, name) then
|
||||||
mark_position(name, pointed_thing.under)
|
mark_position(name, pointed_thing.under)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
function logic.register_doorcontroller_nodes(node_names)
|
function logic.register_doorcontroller_nodes(node_names)
|
||||||
|
Loading…
Reference in New Issue
Block a user