mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-10 00:43:27 +02:00
tweaks
This commit is contained in:
parent
ce40c97962
commit
ea9ce196a0
@ -28,9 +28,9 @@ local function get_active_biter_count(biter_force_name)
|
||||
end
|
||||
|
||||
function set_biter_raffle_table(surface, biter_force_name)
|
||||
|
||||
local biters = surface.find_entities_filtered({type = "unit", force = biter_force_name})
|
||||
if not biters[1] then return end
|
||||
if not biters[1] then return end
|
||||
global.biter_raffle[biter_force_name] = {}
|
||||
for _, e in pairs(biters) do
|
||||
if math_random(1,3) == 1 then
|
||||
global.biter_raffle[biter_force_name][#global.biter_raffle[biter_force_name] + 1] = e.name
|
||||
|
@ -19,7 +19,7 @@ local function init_surface()
|
||||
["coal"] = {frequency = "2", size = "1", richness = "1"},
|
||||
["stone"] = {frequency = "2", size = "1", richness = "1"},
|
||||
["copper-ore"] = {frequency = "2", size = "1", richness = "1"},
|
||||
["iron-ore"] = {frequency = "2", size = "1", richness = "1"},
|
||||
["iron-ore"] = {frequency = "2.5", size = "1.1", richness = "1"},
|
||||
["uranium-ore"] = {frequency = "2", size = "1", richness = "1"},
|
||||
["crude-oil"] = {frequency = "2.5", size = "1", richness = "1.5"},
|
||||
["trees"] = {frequency = "1.25", size = "0.6", richness = "0.5"},
|
||||
|
@ -48,7 +48,7 @@ local function annihilate_base_v2(center_pos, surface, force_name)
|
||||
for y = -80, 80, 1 do
|
||||
local pos = {x = center_pos.x + x, y = center_pos.y + y}
|
||||
local distance_to_center = math.ceil(math.sqrt((pos.x - center_pos.x)^2 + (pos.y - center_pos.y)^2))
|
||||
if distance_to_center < 52 and math.random(1,7) == 1 then
|
||||
if distance_to_center < 42 and math.random(1,7) == 1 then
|
||||
if not positions[distance_to_center] then positions[distance_to_center] = {} end
|
||||
positions[distance_to_center][#positions[distance_to_center] + 1] = pos
|
||||
end
|
||||
|
@ -29,7 +29,9 @@ local function reveal_map()
|
||||
end
|
||||
|
||||
local function clear_corpses()
|
||||
for _, e in pairs(game.surfaces["biter_battles"].find_entities_filtered({type = "corpse"})) do
|
||||
local corpses = game.surfaces["biter_battles"].find_entities_filtered({type = "corpse"})
|
||||
if #corpses < 1024 then return end
|
||||
for _, e in pairs(corpses) do
|
||||
if math.random(1, 3) == 1 then
|
||||
e.destroy()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user