mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
@@ -196,7 +197,7 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-PIPE'].value th
|
||||
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
|
||||
|
||||
@@ -216,8 +217,10 @@ if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-ROBOT'].value t
|
||||
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
|
||||
@@ -371,7 +374,7 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TOOL'].value th
|
||||
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,
|
||||
@@ -581,7 +584,7 @@ if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-UTILITY'].value
|
||||
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'})
|
||||
end
|
||||
|
||||
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'})
|
||||
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
|
||||
|
||||
if settings.startup['PHI-CT'].value then
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user