You've already forked ComfyFactorio
mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-09-16 09:06:21 +02:00
spawn ores, config options
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
local Price_raffle = require 'maps.expanse.price_raffle'
|
||||
local Public = {}
|
||||
|
||||
local ores = {"copper-ore", "iron-ore", "stone", "coal"}
|
||||
local price_modifiers = {
|
||||
["unit-spawner"] = -256,
|
||||
["unit"] = -16,
|
||||
@@ -163,6 +164,14 @@ function Public.expand(expanse, left_top)
|
||||
surface.spill_item_stack({a, a + 2}, {name = "small-plane", count = 1}, false, nil, false)
|
||||
surface.spill_item_stack({a + 0.5, a + 2.5}, {name = "small-plane", count = 1}, false, nil, false)
|
||||
surface.spill_item_stack({a - 0.5, a + 2.5}, {name = "small-plane", count = 1}, false, nil, false)
|
||||
|
||||
for x = 0, square_size, 1 do
|
||||
for y = 0, square_size, 1 do
|
||||
if surface.can_place_entity({name = "wooden-chest", position = {x, y}}) and surface.can_place_entity({name = "coal", position = {x, y}, amount = 1}) then
|
||||
surface.create_entity({name = ores[(x + y) % 4 + 1], position = {x, y}, amount = 1000})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -171,7 +180,7 @@ local function init_container(expanse, entity)
|
||||
if not left_top then return end
|
||||
|
||||
local cell_value = get_cell_value(expanse, left_top)
|
||||
|
||||
|
||||
local item_stacks = {}
|
||||
local roll_count = 2
|
||||
for _ = 1, roll_count, 1 do
|
||||
|
@@ -1,4 +1,9 @@
|
||||
local override_nauvis = true
|
||||
-- a map where you feed hungry boxes, which unlocks new territory, with even more hungry boxes by mewmew
|
||||
|
||||
--CONFIGS
|
||||
local override_nauvis = true -- adds custom mixed ores and raises frequency of resources
|
||||
local cell_size = 15 -- size of each territory to unlock
|
||||
local chance_to_receive_token = 0.50 -- chance of a hungry chest, dropping a token after unlocking, can be above 1 for multiple
|
||||
|
||||
require 'modules.satellite_score'
|
||||
|
||||
@@ -24,7 +29,7 @@ local function set_nauvis()
|
||||
["stone"] = {frequency = 10, size = 0.7, richness = 0.5,},
|
||||
["copper-ore"] = {frequency = 10, size = 0.7, richness = 0.75,},
|
||||
["iron-ore"] = {frequency = 10, size = 0.7, richness = 1,},
|
||||
["uranium-ore"] = {frequency = 10, size = 0.5, richness = 1,},
|
||||
["uranium-ore"] = {frequency = 10, size = 0.7, richness = 1,},
|
||||
["crude-oil"] = {frequency = 20, size = 1.5, richness = 1.5,},
|
||||
["trees"] = {frequency = 1.75, size = 1.25, richness = 1},
|
||||
["enemy-base"] = {frequency = 10, size = 2, richness = 1},
|
||||
@@ -224,10 +229,10 @@ local function on_init(event)
|
||||
T.sub_caption_color = {r = 120, g = 120, b = 0}
|
||||
|
||||
if not expanse.source_surface then expanse.source_surface = "nauvis" end
|
||||
if not expanse.token_chance then expanse.token_chance = 0.33 end
|
||||
if not expanse.price_distance_modifier then expanse.price_distance_modifier = 0.004 end
|
||||
if not expanse.token_chance then expanse.token_chance = chance_to_receive_token end
|
||||
if not expanse.price_distance_modifier then expanse.price_distance_modifier = 0.006 end
|
||||
if not expanse.max_ore_price_modifier then expanse.max_ore_price_modifier = 0.33 end
|
||||
if not expanse.square_size then expanse.square_size = 16 end
|
||||
if not expanse.square_size then expanse.square_size = cell_size end
|
||||
|
||||
game.map_settings.enemy_expansion.enabled = true
|
||||
game.map_settings.enemy_expansion.max_expansion_cooldown = 1800
|
||||
|
Reference in New Issue
Block a user