mirror of
https://github.com/minetest-mods/areas.git
synced 2024-12-25 02:00:40 +01:00
Allow open areas inside closed areas to be used openly
This commit is contained in:
parent
78ca95d5b4
commit
ce8891a325
6
api.lua
6
api.lua
@ -21,12 +21,10 @@ function areas:canInteract(pos, name)
|
|||||||
end
|
end
|
||||||
local owned = false
|
local owned = false
|
||||||
for _, area in pairs(self:getAreasAtPos(pos)) do
|
for _, area in pairs(self:getAreasAtPos(pos)) do
|
||||||
if area.owner == name then
|
if area.owner == name or area.open then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
if not area.open then
|
owned = true
|
||||||
owned = true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return not owned
|
return not owned
|
||||||
|
Loading…
Reference in New Issue
Block a user