diff --git a/map_gen/misc/nightfall.lua b/map_gen/misc/nightfall.lua index f5a49cfb..bd98158c 100644 --- a/map_gen/misc/nightfall.lua +++ b/map_gen/misc/nightfall.lua @@ -32,6 +32,7 @@ local lastattack local c_index local random = math.random local insert = table.insert +local get_pollution = game.surfaces[1].get_pollution local function biter_attack() local maxindex = #bases @@ -90,7 +91,7 @@ local function find_bases() state = ATTACKING break end - if game.surfaces[1].get_pollution(chunklist[i]) > 0.1 then + if get_pollution(chunklist[i]) > 0.1 then local chunkcoord = chunklist[i] if (game.surfaces[1].count_entities_filtered{area={{chunkcoord.x-16, chunkcoord.y-16},{chunkcoord.x+16, chunkcoord.y+16}}, type = "unit-spawner"}) > 0 then