mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-05 13:15:03 +02:00
updates
This commit is contained in:
parent
c944d5fca7
commit
6771161f5b
@ -39,11 +39,11 @@ require "score"
|
||||
-----------------------------
|
||||
|
||||
---- enable maps here ----
|
||||
require "maps.biter_battles_v2.biter_battles_v2"
|
||||
--require "maps.biter_battles_v2.biter_battles_v2"
|
||||
--require "maps.biter_battles.biter_battles"
|
||||
--require "maps.cave_miner"
|
||||
--require "maps.labyrinth"
|
||||
--require "maps.junkyard"
|
||||
require "maps.junkyard"
|
||||
--require "maps.spooky_forest"
|
||||
--require "maps.nightfall"
|
||||
--require "maps.atoll"
|
||||
|
@ -67,7 +67,7 @@ local function select_units_around_spawner(spawner, force_name, biter_force_name
|
||||
local biters = spawner.surface.find_enemy_units(spawner.position, 160, force_name)
|
||||
if not biters[1] then return false end
|
||||
local valid_biters = {}
|
||||
local size = math_random(2, 5) * 0.1
|
||||
local size = math_random(2, 4) * 0.1
|
||||
local threat = global.bb_threat[biter_force_name] * size
|
||||
for _, biter in pairs(biters) do
|
||||
if biter.force.name == biter_force_name then
|
||||
|
@ -12,10 +12,10 @@ local function init_surface()
|
||||
map_gen_settings.starting_area = "4.75"
|
||||
map_gen_settings.cliff_settings = {cliff_elevation_interval = 12, cliff_elevation_0 = 32}
|
||||
map_gen_settings.autoplace_controls = {
|
||||
["coal"] = {frequency = "3.5", size = "1.2", richness = "1"},
|
||||
["stone"] = {frequency = "3.5", size = "1.2", richness = "1"},
|
||||
["copper-ore"] = {frequency = "3.5", size = "1.2", richness = "1"},
|
||||
["iron-ore"] = {frequency = "3.5", size = "1.2", richness = "1"},
|
||||
["coal"] = {frequency = "3", size = "1.2", richness = "1"},
|
||||
["stone"] = {frequency = "3", size = "1.2", richness = "1"},
|
||||
["copper-ore"] = {frequency = "3", size = "1.2", richness = "1"},
|
||||
["iron-ore"] = {frequency = "3", size = "1.2", richness = "1"},
|
||||
["uranium-ore"] = {frequency = "2", size = "1", richness = "1"},
|
||||
["crude-oil"] = {frequency = "3", size = "1", richness = "1"},
|
||||
["trees"] = {frequency = "1.1", size = "0.5", richness = "0.65"},
|
||||
|
@ -61,13 +61,13 @@ local function feed_biters(player, food)
|
||||
for a = 1, flask_amount, 1 do
|
||||
--SET THREAT INCOME
|
||||
local e = (global.bb_evolution[biter_force_name] * 100) + 1
|
||||
local diminishing_modifier = (1 / (10 ^ (e * 0.015))) / (e * 0.5)
|
||||
local diminishing_modifier = (1 / (10 ^ (e * 0.016))) / (e * 0.5)
|
||||
global.bb_threat_income[biter_force_name] = global.bb_threat_income[biter_force_name] + (food_values[food].value * diminishing_modifier * 12)
|
||||
global.bb_threat_income[biter_force_name] = math_round(global.bb_threat_income[biter_force_name], decimals)
|
||||
|
||||
---SET EVOLUTION
|
||||
local e2 = (game.forces[biter_force_name].evolution_factor * 100) + 1
|
||||
local diminishing_modifier = (1 / (10 ^ (e2 * 0.015))) / (e2 * 0.5)
|
||||
local diminishing_modifier = (1 / (10 ^ (e2 * 0.016))) / (e2 * 0.5)
|
||||
local evo_gain = (food_values[food].value * diminishing_modifier)
|
||||
global.bb_evolution[biter_force_name] = global.bb_evolution[biter_force_name] + evo_gain
|
||||
global.bb_evolution[biter_force_name] = math_round(global.bb_evolution[biter_force_name], decimals)
|
||||
|
@ -301,6 +301,15 @@ local function create_inner_content(surface, pos, noise)
|
||||
end
|
||||
return
|
||||
end
|
||||
if math_random(1, 500) == 1 then
|
||||
if surface.can_place_entity({name = "biter-spawner", position = pos}) then
|
||||
local distance_to_center = pos.x ^ 2 + pos.y ^ 2
|
||||
if distance_to_center > 20000 then
|
||||
surface.create_entity({name = "biter-spawner", position = pos})
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
local function process_entity(e)
|
||||
@ -407,7 +416,7 @@ local function on_chunk_charted(event)
|
||||
local distance_to_center = math.sqrt(pos.x^2 + pos.y^2)
|
||||
local size = 7 + math.floor(distance_to_center * 0.0075)
|
||||
if size > 20 then size = 20 end
|
||||
local amount = 200 + distance_to_center
|
||||
local amount = 500 + distance_to_center * 2
|
||||
map_functions.draw_rainbow_patch_v2(pos, surface, size, amount)
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user