1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-24 03:47:58 +02:00

incomplete spawn area fix

This commit is contained in:
MewMew 2020-04-16 15:26:46 +02:00
parent 5ad0607d9a
commit b7db6f8c73
3 changed files with 4 additions and 4 deletions

View File

@ -212,10 +212,10 @@ local function select_units_around_spawner(spawner, force_name, biter_force_name
if not biters[1] then return false end
local valid_biters = {}
local threat = global.bb_threat[biter_force_name] * math_random(11,22) * 0.01
local threat = global.bb_threat[biter_force_name] * math_random(8, 32) * 0.01
local unit_count = 0
local max_unit_count = math.ceil(global.bb_threat[biter_force_name] * 0.25) + math_random(6,12)
local max_unit_count = math.floor(global.bb_threat[biter_force_name] * 0.25) + math_random(6,12)
if max_unit_count > bb_config.max_group_size then max_unit_count = bb_config.max_group_size end
for _, biter in pairs(biters) do

View File

@ -179,7 +179,7 @@ local function on_init()
Terrain.draw_spawn_area(surface)
Terrain.generate_additional_spawn_ore(surface)
Terrain.generate_silo(surface)
Terrain.draw_spawn_circle(surface)
Terrain.draw_spawn_circle(surface)
end
local Event = require 'utils.event'

View File

@ -502,7 +502,7 @@ function Public.draw_spawn_area(surface)
local r = chunk_r * 32
for x = r * -1, r, 1 do
for y = r * -1, -32, 1 do
for y = r * -1, -4, 1 do
local pos = {x = x, y = y}
local distance_to_center = math_sqrt(pos.x ^ 2 + pos.y ^ 2)
generate_starting_area(pos, distance_to_center, surface)