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 mods['space-age'] then
|
||||||
if settings.startup['PHI-CT'].value 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
|
if not settings.startup['PHI-CT-SPOIL'].value then
|
||||||
local function spoil_handle(i)
|
local function spoil_handle(i)
|
||||||
i.spoil_ticks = nil
|
i.spoil_ticks = nil
|
||||||
|
|||||||
@@ -170,23 +170,24 @@ if settings.startup['PHI-EQ'].value and settings.startup['PHI-EQ-ARMOR'].value t
|
|||||||
end
|
end
|
||||||
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'].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-2'].effect = {consumption=-0.8, pollution=-0.8}
|
||||||
data.raw['module']['efficiency-module-3'].effect = {consumption=-1.2, pollution=-1.2}
|
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}}
|
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
|
for _, v in pairs(data.raw['reactor']) do
|
||||||
v.scale_energy_usage = settings.startup['PHI-MI-NUCLEAR'].value
|
v.scale_energy_usage = settings.startup['PHI-MI-NUCLEAR'].value
|
||||||
end
|
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
|
local s = (1 + settings.startup['PHI-MI-PIPE'].value) / 2
|
||||||
|
|
||||||
for _, t in pairs({data.raw['offshore-pump'], data.raw['pump']}) do
|
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
|
v.pumping_speed = v.pumping_speed * s
|
||||||
end
|
end
|
||||||
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 s = (1 + settings.startup['PHI-MI-ROBOT'].value) / 2
|
||||||
local sn = (17 - settings.startup['PHI-MI-ROBOT'].value) / 16
|
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
|
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'])
|
local item = table.deepcopy(data.raw['item']['radar'])
|
||||||
item.name = 'super-radar'
|
item.name = 'super-radar'
|
||||||
item.place_result = item.name
|
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
|
||||||
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'])
|
local item = table.deepcopy(data.raw['item']['steel-chest'])
|
||||||
item.name = 'trash-chest'
|
item.name = 'trash-chest'
|
||||||
item.place_result = item.name
|
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 = {
|
entity.energy_source = {
|
||||||
type = 'electric',
|
type = 'electric',
|
||||||
usage_priority = 'secondary-input',
|
usage_priority = 'secondary-input',
|
||||||
buffer_capacity = '14400kJ',
|
buffer_capacity = entity.buffer_capacity,
|
||||||
light_flicker = {
|
light_flicker = {
|
||||||
color = {r=0.5, g=1, b=1, a=0.5},
|
color = {r=0.5, g=1, b=1, a=0.5},
|
||||||
minimum_light_size = 0.1,
|
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
|
for _, r in pairs({'active-provider', 'buffer', 'requester'}) do
|
||||||
table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-' .. r .. '-chest'})
|
table.insert(data.raw.technology['logistic-system'].effects, {type='unlock-recipe', recipe='basic-' .. r .. '-chest'})
|
||||||
end
|
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'])
|
local item = table.deepcopy(data.raw['item']['linked-chest'])
|
||||||
item.supgroup = 'storage'
|
item.supgroup = 'storage'
|
||||||
item.order = 'a[items]-d[linked-chest]'
|
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'].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-2'].effects, {type='unlock-recipe', recipe='fast-loader'})
|
||||||
table.insert(data.raw.technology['logistics-3'].effects, {type='unlock-recipe', recipe='express-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
|
||||||
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.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
|
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-silo'].logistic_trash_inventory_size = 20
|
||||||
data.raw['rocket-silo-rocket']['rocket-silo-rocket'].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
|
end
|
||||||
|
|
||||||
for _, v in pairs(data.raw['active-defense-equipment']) do
|
for _, v in pairs(data.raw['active-defense-equipment']) do
|
||||||
|
|||||||
Reference in New Issue
Block a user