Skip to content

Commit

Permalink
allow mobs to spawn normally if there's no protection areas...
Browse files Browse the repository at this point in the history
  • Loading branch information
fluxionary committed Dec 10, 2023
1 parent dad7213 commit 7ca5565
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions compat/areas.lua
Expand Up @@ -63,11 +63,17 @@ else
})

spawnit.register_pos_check(function(pos)
for _, area in pairs(areas:getAreasAtPos(pos)) do
if area.spawnit_enabled == true then
local as = areas:getAreasAtPos(pos)
if #as == 0 then
return true
end

for i = 1, #as do
if as[i].spawnit_enabled == true then
return true
end
end

return false, true
end)
end

0 comments on commit 7ca5565

Please sign in to comment.