1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-30 23:17:53 +02:00

Biter health booster - more checks

This commit is contained in:
Gerkiz 2021-12-10 22:47:30 +01:00
parent 392d023091
commit c1536fe5b4

View File

@ -201,6 +201,9 @@ local function clean_table()
end
local surface = game.surfaces[this.active_surface]
if not (surface and surface.valid) then
return
end
for _, unit in pairs(surface.find_entities_filtered({type = validTypes})) do
units_to_delete[unit.unit_number] = nil
@ -484,7 +487,7 @@ end
function Public.set_active_surface(str)
if str and type(str) == 'string' then
this.active_surfaces = {}
this.active_surface = str
this.active_surface = str or 'nauvis'
end
return this.active_surface
end