Another protection bugfix

This commit is contained in:
Aaron Suen 2021-03-20 20:19:42 -04:00
parent 12582da596
commit 46a925f913

View File

@ -43,14 +43,14 @@ end
-- handle placement check from special cases.
local old_prot = minetest.is_protected
function minetest.is_protected(pos, name, ...)
if metacheck(pos, minetest.get_node(pos).name, name) then return true end
if metacheck(pos, name) then return true end
return old_prot(pos, name, ...)
end
local old_exempt = nodecore.protection_exempt
function nodecore.protection_exempt(pos, name, ...)
local old = old_exempt(pos, name, ...)
if not old then return old end
if metacheck(pos, minetest.get_node(pos).name, name) then return end
if metacheck(pos, name) then return end
return old
end