From b3ddc91489e3ec2c2ba62a314d6252eb7326bf50 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Tue, 9 Nov 2021 20:25:01 +0100 Subject: [PATCH] Improve area protection check --- logic/doorcontroller2.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/logic/doorcontroller2.lua b/logic/doorcontroller2.lua index 9b3e916..2ab46ef 100644 --- a/logic/doorcontroller2.lua +++ b/logic/doorcontroller2.lua @@ -179,7 +179,7 @@ local function exchange_nodes(pos, nvm, slot) for idx = (slot or 1), (slot or 16) do 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]) res = true end @@ -381,7 +381,9 @@ minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing) return end - mark_position(name, pointed_thing.under) + if not minetest.is_protected(pointed_thing.under, name) then + mark_position(name, pointed_thing.under) + end end end)