This commit is contained in:
2026-07-01 18:31:04 +09:00
parent ecd0c361b3
commit 13f0aedfdb
3 changed files with 103 additions and 52 deletions
+36
View File
@@ -24,6 +24,42 @@ local items = {
results = {{type = 'item', name = 'foundation', amount = 1}} results = {{type = 'item', name = 'foundation', amount = 1}}
} }
}, },
['technology_reform'] = {
-- BASE 0
['cliff-explosives'] = {
prerequisites = {'explosives', 'military-2'},
unit = {count = 200, time = 15, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}}},
effects = {{type = 'unlock-recipe', recipe = 'cliff-explosives'}, {type = 'cliff-deconstruction-enabled', modifier = true}}
},
-- ELEVATED_RAIL 0
['elevated-rail'] = {
prerequisites = {'concrete', 'railway'},
unit_count = 400,
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}}
},
-- SPACE_AGE 0
['foundation'] = {
prerequisites = {'rail-support-foundations'},
unit_count = 1000,
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}
},
['rail-support-foundations'] = {
prerequisites = {'elevated-rail', 'planet-discovery-fulgora'},
unit_count = 600,
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}
},
},
['technology'] = {
-- SPACE_AGE 0
['artillery-shell-damage-1'] = true,
['railgun-damage-1'] = true,
['railgun-shooting-speed-1'] = true,
['electric-weapons-damage-1'] = true,
['electric-weapons-damage-2'] = true,
-- SPACE_AGE 5
['electric-weapons-damage-3'] = true,
['electric-weapons-damage-4'] = true,
}
} }
return items return items
+32 -18
View File
@@ -402,6 +402,16 @@ if data.raw['lab'] then
end end
end end
for _, v in pairs(data.raw.technology) do
if v.unit and v.unit.ingredients then
for i = #v.unit.ingredients, 1, -1 do
if data.raw.item[v.unit.ingredients[i][1]].hidden then
table.remove(v.unit.ingredients, i)
end
end
end
end
-- GM-VP H 30 SPACE_AGE RESEARCH -- GM-VP H 30 SPACE_AGE RESEARCH
-- GM-VP H 5 QUALITY RESEARCH -- GM-VP H 5 QUALITY RESEARCH
if items['technology'] then if items['technology'] then
@@ -418,29 +428,33 @@ end
-- GM-VP C 27 BASE RESEARCH -- GM-VP C 27 BASE RESEARCH
-- GM-VP C 39 SPACE_AGE RESEARCH -- GM-VP C 39 SPACE_AGE RESEARCH
if items['technology_reform'] then
for t, l in pairs(items['technology_reform']) do
if data.raw.technology[t] then
for _, c in pairs({'prerequisites', 'effects', 'max_level', 'unit'}) do
if l[c] then
data.raw.technology[t][c] = l[c]
end
end
if data.raw.technology[t]['unit'] then
data.raw.technology[t].research_trigger = nil
for _, c in pairs({'ingredients', 'count', 'count_formula'}) do
if l['unit_' .. c] then
data.raw.technology[t]['unit'][c] = l['unit_' .. c]
end
end
end
end
end
end
if items['technology_reform'] then if items['technology_reform'] then
for _, v in pairs(data.raw.technology) do for _, v in pairs(data.raw.technology) do
if items['technology_reform'][v.name] then if items['technology_reform'][v.name] then
v.prerequisites = (items['technology_reform'][v.name].prerequisites and items['technology_reform'][v.name].prerequisites) or v.prerequisites
v.effects = (items['technology_reform'][v.name].effects and items['technology_reform'][v.name].effects) or v.effects
v.max_level = (items['technology_reform'][v.name].max_level and items['technology_reform'][v.name].max_level) or v.max_level
if items['technology_reform'][v.name].unit then
v.unit = items['technology_reform'][v.name].unit
end
if v.unit then if v.unit then
v.research_trigger = nil
v.unit.ingredients = (items['technology_reform'][v.name].unit_ingredients and items['technology_reform'][v.name].unit_ingredients) or v.unit.ingredients
v.unit.count = (items['technology_reform'][v.name].unit_count and items['technology_reform'][v.name].unit_count) or v.unit.count
v.unit.count_formula = (items['technology_reform'][v.name].unit_count_formula and items['technology_reform'][v.name].unit_count_formula) or v.unit.count_formula
end
elseif v.unit and v.unit.ingredients then
for i = #v.unit.ingredients, 1, -1 do
if data.raw.item[v.unit.ingredients[i][1]].hidden then
table.remove(v.unit.ingredients, i)
end
end end
end end
end end
+35 -34
View File
@@ -52,32 +52,42 @@ if data.raw.ammo['artillery-shell'] then
data.raw.ammo['artillery-shell'].stack_size = data.raw['inserter']['stack-inserter'].max_belt_stack_size data.raw.ammo['artillery-shell'].stack_size = data.raw['inserter']['stack-inserter'].max_belt_stack_size
end end
-- GM C 1 SPACE_AGE TECHNOLOGY
if data.raw.technology['foundation'] then
data.raw.technology['foundation'].prerequisites = {'rail-support-foundations'}
data.raw.technology['foundation'].unit.count = 1000
data.raw.technology['foundation'].unit.ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}
end
-- GM C 1 SPACE_AGE TECHNOLOGY
if data.raw.technology['rail-support-foundations'] then
data.raw.technology['rail-support-foundations'].prerequisites = {'elevated-rail', 'planet-discovery-fulgora'}
data.raw.technology['rail-support-foundations'].unit.count = 600
data.raw.technology['rail-support-foundations'].unit.ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}
end
-- GM C 1 ELEVATED_RAIL TECHNOLOGY
if data.raw.technology['elevated-rail'] then
data.raw.technology['elevated-rail'].prerequisites = {'concrete', 'railway'}
data.raw.technology['elevated-rail'].unit.count = 400
data.raw.technology['elevated-rail'].unit.ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}}
end
-- GM C 1 BASE RESEARCH -- GM C 1 BASE RESEARCH
if data.raw.technology['cliff-explosives'] then -- GM C 1 ELEVATED_RAIL RESEARCH
data.raw.technology['cliff-explosives'].prerequisites = {'explosives', 'military-2'} -- GM C 2 SPACE_AGE RESEARCH
data.raw.technology['cliff-explosives'].unit = {count = 200, time = 15, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}}} if items['technology_reform'] then
data.raw.technology['cliff-explosives'].effects = {{type = 'unlock-recipe', recipe = 'cliff-explosives'}, {type = 'cliff-deconstruction-enabled', modifier = true}} for t, l in pairs(items['technology_reform']) do
if data.raw.technology[t] then
for _, c in pairs({'prerequisites', 'effects', 'max_level', 'unit'}) do
if l[c] then
data.raw.technology[t][c] = l[c]
end
end
if data.raw.technology[t]['unit'] then
data.raw.technology[t].research_trigger = nil
for _, c in pairs({'ingredients', 'count', 'count_formula'}) do
if l['unit_' .. c] then
data.raw.technology[t]['unit'][c] = l['unit_' .. c]
end
end
end
end
end
end
-- GM H 7 SPACE_AGE RESEARCH
if items['technology'] then
for t, _ in pairs(items['technology']) do
if data.raw.technology[t] then
data.raw.technology[t].hidden = true
data.raw.technology[t].hidden_in_factoriopedia = true
data.raw.technology[t].effects = nil
data.raw.technology[t].research_trigger = nil
data.raw.technology[t].unit = {count = 1000, time = 30, ingredients = {{'automation-science-pack', 1}}}
end
end
end end
-- GM A 9 BASE RESEARCH_EFFECT -- GM A 9 BASE RESEARCH_EFFECT
@@ -98,15 +108,6 @@ for _, v in pairs({{'stronger-explosives-4', 'ammo-damage', 'artillery-shell', 0
end end
end end
-- GM H 7 SPACE_AGE RESEARCH
for _, v in pairs({'artillery-shell-damage-1', 'railgun-damage-1', 'railgun-shooting-speed-1', 'electric-weapons-damage-1', 'electric-weapons-damage-2', 'electric-weapons-damage-3', 'electric-weapons-damage-4'}) do
if data.raw.technology[v] then
data.raw.technology[v].hidden = true
data.raw.technology[v].hidden_in_factoriopedia = true
data.raw.technology[v].effects = {}
end
end
-- GM C 5 BASE RESOURCE -- GM C 5 BASE RESOURCE
-- GM C 3 SPACE_AGE RESOURCE -- GM C 3 SPACE_AGE RESOURCE
for _, v in pairs(data.raw['resource']) do for _, v in pairs(data.raw['resource']) do