Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 01:24:00 +09:00
parent 3daffc8b63
commit c2e7dff3cc
+58 -38
View File
@@ -1,45 +1,11 @@
if settings.startup['PHI-SA'].value and (not settings.startup['PHI-SA-SPOIL'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'VP') then
local function spoil_handle(i)
local function spoil_handle(i)
i.spoil_ticks = nil
i.spoil_result = nil
i.spoil_to_trigger_result = nil
end
for _, v in pairs({'nutrients', 'captive-biter-spawner', 'biter-egg', 'pentapod-egg'}) do
spoil_handle(data.raw['item'][v])
end
for _, v in pairs({'raw-fish', 'yumako-mash', 'yumako', 'jelly', 'jellynut', 'bioflux'}) do
spoil_handle(data.raw['capsule'][v])
end
spoil_handle(data.raw.tool['agricultural-science-pack'])
data:extend({{
type = 'recipe',
name = 'spoilage-from-nutrients',
category = 'organic-or-assembling',
subgroup = 'agriculture-processes',
order = 'c[nutrients]-z',
energy_required = 2,
enabled = false,
allow_productivity = true,
ingredients = {{type = 'item', name = 'nutrients', amount = 1}},
results = {{type = 'item', name = 'spoilage', amount = 8}},
main_product = 'spoilage',
localised_name = {'item-name.spoilage'}
}})
table.insert(data.raw.technology['agriculture'].effects, {type = 'unlock-recipe', recipe = 'spoilage-from-nutrients'})
for _, v in pairs({'spoilables', 'spoilables-result', 'spoilables-research'}) do
data.raw['tips-and-tricks-item'][v] = nil
end
end
if settings.startup['PHI-SA'].value and settings.startup['PHI-SA-SPOIL'].value and settings.startup['PHI-SA-SPOIL-FREEZE'].value then
local function spoil_handle(i)
local function spoil_freeze_handle(i)
local item = table.deepcopy(i)
item.name = 'frozen-' .. i.name
item.order = item.order .. '-f'
@@ -81,17 +47,71 @@ if settings.startup['PHI-SA'].value and settings.startup['PHI-SA-SPOIL'].value a
table.insert(data.raw.technology['cryogenic-plant'].effects, {type = 'unlock-recipe', recipe = item.name})
table.insert(data.raw.technology['cryogenic-plant'].effects, {type = 'unlock-recipe', recipe = 'unfreeze-' .. i.name})
end
end
-- SA A 11 SPACE_AGE ITEM
-- SA A 22 SPACE_AGE RECIPE,RESEARCH_EFFECT
-- SA C 6 SPACE_AGE CAPSULE
-- SA C 4 SPACE_AGE ITEM
-- SA C 1 SPACE_AGE TOOL
if settings.startup['PHI-SA'].value then
local spoil_set = (not settings.startup['PHI-SA-SPOIL'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'VP')
local spoil_freeze_set = settings.startup['PHI-SA-SPOIL'].value and settings.startup['PHI-SA-SPOIL-FREEZE'].value and settings.startup['PHI-SA-SPOIL-FREEZE'].value > 0
for _, v in pairs({'nutrients', 'captive-biter-spawner', 'biter-egg', 'pentapod-egg'}) do
if spoil_set then
spoil_handle(data.raw['item'][v])
end
if spoil_freeze_set then
spoil_freeze_handle(data.raw['item'][v])
end
end
for _, v in pairs({'raw-fish', 'yumako-mash', 'yumako', 'jelly', 'jellynut', 'bioflux'}) do
if spoil_set then
spoil_handle(data.raw['capsule'][v])
end
spoil_handle(data.raw.tool['agricultural-science-pack'])
if spoil_freeze_set then
spoil_freeze_handle(data.raw['capsule'][v])
end
end
if spoil_set then
spoil_handle(data.raw['tool']['agricultural-science-pack'])
end
if spoil_freeze_set then
spoil_freeze_handle(data.raw['tool']['agricultural-science-pack'])
end
end
-- SA A 1 SPACE_AGE RECIPE
-- SA A 1 SPACE_AGE RESEARCH_EFFECT
-- SA C 3 SPACE_AGE TIPS_AND_TRICKS
if settings.startup['PHI-SA'].value and (not settings.startup['PHI-SA-SPOIL'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'VP') then
data:extend({{
type = 'recipe',
name = 'spoilage-from-nutrients',
category = 'organic-or-assembling',
subgroup = 'agriculture-processes',
order = 'c[nutrients]-z',
energy_required = 2,
enabled = false,
allow_productivity = true,
ingredients = {{type = 'item', name = 'nutrients', amount = 1}},
results = {{type = 'item', name = 'spoilage', amount = 8}},
main_product = 'spoilage',
localised_name = {'item-name.spoilage'}
}})
table.insert(data.raw.technology['agriculture'].effects, {type = 'unlock-recipe', recipe = 'spoilage-from-nutrients'})
for _, v in pairs({'spoilables', 'spoilables-result', 'spoilables-research'}) do
data.raw['tips-and-tricks-item'][v].hidden = true
data.raw['tips-and-tricks-item'][v].hidden_in_factoriopedia = true
end
end
if settings.startup['PHI-SA'].value and settings.startup['PHI-SA-QUALITY'].value then