This commit is contained in:
2024-11-01 18:40:22 +09:00
parent 715244492f
commit 1ccf4e5a3a
2 changed files with 420 additions and 418 deletions

View File

@@ -4,6 +4,11 @@ local file_stage = 2
if mods['space-age'] then
if settings.startup['PHI-CT'].value then
if settings.startup['PHI-CT-HIDDEN'].value then
data.raw.recipe['turbo-loader'].hidden = false
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type='unlock-recipe', recipe='turbo-loader'})
end
if not settings.startup['PHI-CT-SPOIL'].value then
local function spoil_handle(i)
i.spoil_ticks = nil

View File

@@ -170,23 +170,24 @@ if settings.startup['PHI-EQ'].value and settings.startup['PHI-EQ-ARMOR'].value t
end
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-EFFCY'].value then
if settings.startup['PHI-MI'].value then
if settings.startup['PHI-MI-EFFCY'].value then
data.raw['module']['efficiency-module'].effect = {consumption=-0.4, pollution=-0.4}
data.raw['module']['efficiency-module-2'].effect = {consumption=-0.8, pollution=-0.8}
data.raw['module']['efficiency-module-3'].effect = {consumption=-1.2, pollution=-1.2}
end
end
if settings.startup['PHI-MI'].value and (settings.startup['PHI-MI-LANDFILL'].value ~= 50) then
if settings.startup['PHI-MI-LANDFILL'].value ~= 50 then
data.raw.recipe['landfill'].ingredients = {{type='item', name='stone', amount=settings.startup['PHI-MI-LANDFILL'].value}}
end
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-NUCLEAR'].value then
if settings.startup['PHI-MI-NUCLEAR'].value then
for _, v in pairs(data.raw['reactor']) do
v.scale_energy_usage = settings.startup['PHI-MI-NUCLEAR'].value
end
end
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value then
if settings.startup['PHI-MI-PIPE'].value then
local s = (1 + settings.startup['PHI-MI-PIPE'].value) / 2
for _, t in pairs({data.raw['offshore-pump'], data.raw['pump']}) do
@@ -194,9 +195,9 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value th
v.pumping_speed = v.pumping_speed * s
end
end
end
end
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ROBOT'].value then
if settings.startup['PHI-MI-ROBOT'].value then
local s = (1 + settings.startup['PHI-MI-ROBOT'].value) / 2
local sn = (17 - settings.startup['PHI-MI-ROBOT'].value) / 16
@@ -215,9 +216,11 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ROBOT'].value t
end
end
end
end
end
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TOOL'].value then
if settings.startup['PHI-CT'].value then
if settings.startup['PHI-CT-TOOL'].value then
local item = table.deepcopy(data.raw['item']['radar'])
item.name = 'super-radar'
item.place_result = item.name
@@ -369,9 +372,9 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TOOL'].value th
}})
end
end
end
end
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-UTILITY'].value then
if settings.startup['PHI-CT-UTILITY'].value then
local item = table.deepcopy(data.raw['item']['steel-chest'])
item.name = 'trash-chest'
item.place_result = item.name
@@ -489,7 +492,7 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-UTILITY'].value
entity.energy_source = {
type = 'electric',
usage_priority = 'secondary-input',
buffer_capacity = '14400kJ',
buffer_capacity = entity.buffer_capacity,
light_flicker = {
color = {r=0.5, g=1, b=1, a=0.5},
minimum_light_size = 0.1,
@@ -579,9 +582,9 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-UTILITY'].value
for _, r in pairs({'active-provider', 'buffer', 'requester'}) do
table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-' .. r .. '-chest'})
end
end
end
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-HIDDEN'].value then
if settings.startup['PHI-CT-HIDDEN'].value then
local item = table.deepcopy(data.raw['item']['linked-chest'])
item.supgroup = 'storage'
item.order = 'a[items]-d[linked-chest]'
@@ -619,14 +622,14 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-HIDDEN'].value
table.insert(data.raw.technology['logistics'].effects, {type='unlock-recipe', recipe='loader'})
table.insert(data.raw.technology['logistics-2'].effects, {type='unlock-recipe', recipe='fast-loader'})
table.insert(data.raw.technology['logistics-3'].effects, {type='unlock-recipe', recipe='express-loader'})
if mods['space-age'] then
data.raw.recipe['turbo-loader'].hidden = false
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type='unlock-recipe', recipe='turbo-loader'})
end
end
if settings.startup['PHI-CT'].value then
if settings.startup['PHI-CT-UTILITY'].value then
for _, t in pairs({'arithmetic-combinator', 'decider-combinator', 'programmable-speaker', 'selector-combinator'}) do
data.raw[t][t].energy_source.usage_priority = 'primary-input'
end
end
data.raw['utility-constants'].default.rocket_lift_weight = settings.startup['PHI-CT-ROCKET-CAPACITY'].value * 100000
data.raw['utility-constants'].default.default_item_weight = settings.startup['PHI-CT-CARGO-WEIGHT'].value
@@ -636,12 +639,6 @@ if settings.startup['PHI-CT'].value then
data.raw['rocket-silo']['rocket-silo'].logistic_trash_inventory_size = 20
data.raw['rocket-silo-rocket']['rocket-silo-rocket'].inventory_size = 20
]]
if settings.startup['PHI-CT-UTILITY'].value then
for _, t in pairs({'arithmetic-combinator', 'decider-combinator', 'programmable-speaker', 'selector-combinator'}) do
data.raw[t][t].energy_source.usage_priority = 'primary-input'
end
end
end
for _, v in pairs(data.raw['active-defense-equipment']) do