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:
parent
392d023091
commit
c1536fe5b4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user