forked from nalc/areas
Allow open areas inside closed areas to be used openly
This commit is contained in:
parent
78ca95d5b4
commit
ce8891a325
4
api.lua
4
api.lua
|
@ -21,14 +21,12 @@ function areas:canInteract(pos, name)
|
|||
end
|
||||
local owned = false
|
||||
for _, area in pairs(self:getAreasAtPos(pos)) do
|
||||
if area.owner == name then
|
||||
if area.owner == name or area.open then
|
||||
return true
|
||||
else
|
||||
if not area.open then
|
||||
owned = true
|
||||
end
|
||||
end
|
||||
end
|
||||
return not owned
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user