Skip fortress mob placement if there aren't any.
This commit is contained in:
parent
cd42c129c3
commit
4f66ec44bd
1 changed files with 1 additions and 2 deletions
3
abms.lua
3
abms.lua
|
@ -50,8 +50,7 @@ minetest.register_globalstep(function(dtime)
|
|||
local minp = vector.subtract(pos, 0.5)
|
||||
local maxp = vector.add(pos, 0.5)
|
||||
|
||||
if fun_caves.fortress_spawns
|
||||
and dps_count % monster_delay == 0 then
|
||||
if fun_caves.fortress_spawns and #fun_caves.fortress_spawns > 0 and dps_count % monster_delay == 0 then
|
||||
local mob_count = 0
|
||||
for _, mob in pairs(minetest.luaentities) do
|
||||
if mob.health and mob.started_in_fortress then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue