From 4f66ec44bdbe66da4f26b3fe4443e938fe609413 Mon Sep 17 00:00:00 2001 From: Duane Date: Tue, 14 Jun 2016 09:56:28 -0500 Subject: [PATCH] Skip fortress mob placement if there aren't any. --- abms.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/abms.lua b/abms.lua index ebc89ac..7ac3c8e 100644 --- a/abms.lua +++ b/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