mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-18 03:21:47 +02:00
Local get_pollution
This commit is contained in:
parent
15d699babd
commit
1ed2b884cb
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user