This commit is contained in:
2026-06-04 20:20:37 +09:00
parent eeb695c3aa
commit 2f08775fda
2 changed files with 106 additions and 50 deletions
+75 -7
View File
@@ -611,6 +611,53 @@ local items = {
['agricultural-science-pack'] = 'tool',
['promethium-science-pack'] = 'tool',
},
['technology_productivity'] = {
['concrete'] = {
prerequisites = {'landfill'},
ingredients = {'metallurgic-science-pack', 'electromagnetic-science-pack'},
effect = {'concrete', 'concrete-from-molten-iron', 'refined-concrete', 'landfill'}
},
['automation'] = {
prerequisites = {'logistics-2'},
ingredients = {'metallurgic-science-pack', 'electromagnetic-science-pack'},
effect = {'pipe', 'casting-pipe', 'iron-gear-wheel', 'casting-iron-gear-wheel', 'barrel'}
},
['electronics'] = {
prerequisites = {},
ingredients = {'metallurgic-science-pack', 'electromagnetic-science-pack'},
effect = {'electronic-circuit', 'copper-cable', 'casting-copper-cable'}
},
['advanced-circuit'] = {
prerequisites = {},
ingredients = {'electromagnetic-science-pack'},
effect = {'advanced-circuit'}
},
['engine'] = {
prerequisites = {},
ingredients = {'electromagnetic-science-pack'},
effect = {'engine-unit', 'electric-engine-unit', 'flying-robot-frame'}
},
['solar-energy'] = {
prerequisites = {},
ingredients = {'electromagnetic-science-pack'},
effect = {'solar-panel', 'accumulator', 'battery'}
},
['railway'] = {
prerequisites = {},
ingredients = {'electromagnetic-science-pack'},
effect = {'rail', 'iron-stick', 'casting-iron-stick'}
},
['sulfur-processing'] = {
prerequisites = {'cliff-explosives'},
ingredients = {'cryogenic-science-pack'},
effect = {'sulfur', 'sulfuric-acid', 'explosives', 'cliff-explosives'}
},
['oil-processing'] = {
prerequisites = {},
ingredients = {'cryogenic-science-pack'},
effect = {'basic-oil-processing', 'advanced-oil-processing', 'coal-liquefaction', 'lubricant'}
},
},
['technology_reform'] = {
-- BASE 0
['speed-module-2'] = {
@@ -809,33 +856,54 @@ local items = {
unit_ingredients = {{'military-science-pack', 1}, {'chemical-science-pack', 1}, {'utility-science-pack', 1}, {'space-science-pack', 1}}
},
['processing-unit-productivity'] = {
prerequisites = {'electromagnetic-plant'},
prerequisites = {'electromagnetic-science-pack'},
unit_count_formula = '1000 * (1.5 ^ (L - 1))',
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'electromagnetic-science-pack', 1}},
max_level = 10,
effects = {{type = 'change-recipe-productivity', recipe = 'processing-unit', change = 0.05}}
},
-- SPACE_AGE 20
['steel-plate-productivity'] = {
prerequisites = {'foundry'},
prerequisites = {'metallurgic-science-pack'},
unit_count_formula = '1000 * (1.5 ^ (L - 1))',
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'metallurgic-science-pack', 1}},
max_level = 10,
effects = {{type = 'change-recipe-productivity', recipe = 'steel-plate', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'casting-steel', change = 0.05}}
},
['low-density-structure-productivity'] = {
prerequisites = {'electromagnetic-plant'},
prerequisites = {'electromagnetic-science-pack'},
unit_count_formula = '1000 * (1.5 ^ (L - 1))',
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'electromagnetic-science-pack', 1}},
max_level = 10,
effects = {{type = 'change-recipe-productivity', recipe = 'low-density-structure', change = 0.05}}
},
['plastic-bar-productivity'] = {
prerequisites = {'cryogenic-plant'},
prerequisites = {'cryogenic-science-pack'},
unit_count_formula = '1000 * (1.5 ^ (L - 1))',
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'cryogenic-science-pack', 1}},
max_level = 10,
effects = {{type = 'change-recipe-productivity', recipe = 'plastic-bar', change = 0.05}}
},
['rocket-fuel-productivity'] = {
prerequisites = {'rocket-fuel', 'electromagnetic-plant'},
prerequisites = {'rocket-fuel', 'cryogenic-science-pack'},
unit_count_formula = '1000 * (1.5 ^ (L - 1))',
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'cryogenic-science-pack', 1}},
max_level = 10,
effects = {{type = 'change-recipe-productivity', recipe = 'solid-fuel-from-petroleum-gas', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'solid-fuel-from-light-oil', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'solid-fuel-from-heavy-oil', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'rocket-fuel', change = 0.05}}
},
['rocket-part-productivity'] = {
prerequisites = {'rocket-silo', 'electromagnetic-plant'},
prerequisites = {'rocket-silo', 'electromagnetic-science-pack'},
unit_count_formula = '1000 * (1.5 ^ (L - 1))',
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'electromagnetic-science-pack', 1}},
max_level = 10,
effects = {{type = 'change-recipe-productivity', recipe = 'rocket-part', change = 0.05}}
},
-- SPACE_AGE 25
['research-productivity'] = {
prerequisites = {'space-science-pack', 'biolab'}
prerequisites = {'space-science-pack', 'biolab', 'metallurgic-science-pack', 'electromagnetic-science-pack', 'cryogenic-science-pack'},
unit_count_formula = '1500 * (1.5 ^ L)',
unit_ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'space-science-pack', 1}, {'metallurgic-science-pack', 1}, {'electromagnetic-science-pack', 1}, {'cryogenic-science-pack', 1}},
max_level = 10,
},
['heating-tower'] = {
prerequisites = {'chemical-science-pack'},
+27 -39
View File
@@ -165,53 +165,39 @@ do
end
-- GM-VP A 9 BASE RESEARCH
for _, v in pairs({'concrete', 'automation', 'electronics', 'advanced-circuit', 'engine', 'sulfur-processing', 'solar-energy', 'railway', 'oil-processing'}) do
if items['technology_productivity'] then
for k, v in pairs(items['technology_productivity']) do
local base_prerequisites = v.prerequisites
local base_ingredient = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}
local base_effect = {}
for _, v2 in pairs(v.ingredients) do
table.insert(base_ingredient, {v2, 1})
table.insert(base_prerequisites, v2)
end
for _, v2 in pairs(v.effect) do
table.insert(base_effect, {type = 'change-recipe-productivity', recipe = v2, change = 0.05})
end
data:extend({{
type = 'technology',
name = v .. '-productivity',
prerequisites = {'electromagnetic-plant'},
effects = {{type = 'change-recipe-productivity', recipe = v, change = 0.05}},
unit = {count_formula = '1000 * (1.5 ^ (L - 1))', ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}, time = 60},
icons = {{icon = '__base__/graphics/technology/' .. v ..'.png', icon_size = 256}, {icon = '__core__/graphics/icons/technology/constants/constant-recipe-productivity.png', icon_size = 128, scale = 0.5, shift = {50, 50}}},
name = k .. '-productivity',
prerequisites = base_prerequisites,
effects = base_effect,
unit = {count_formula = '1000 * (1.5 ^ (L - 1))', ingredients = base_ingredient, time = 60},
icons = {{icon = '__base__/graphics/technology/' .. k ..'.png', icon_size = 256}, {icon = '__core__/graphics/icons/technology/constants/constant-recipe-productivity.png', icon_size = 128, scale = 0.5, shift = {50, 50}}},
order = 'a-i-d',
max_level = 10,
upgrade = true,
localised_name = {'technology-name.' .. v}
localised_name = {'technology-name.' .. k}
}})
end
end
table.insert(data.raw.technology['concrete-productivity'].prerequisites, 'landfill')
table.insert(data.raw.technology['solar-energy-productivity'].prerequisites, 'electric-energy-accumulators')
table.insert(data.raw.technology['sulfur-processing-productivity'].prerequisites, 'cliff-explosives')
data.raw.technology['concrete-productivity'].effects = {{type = 'change-recipe-productivity', recipe = 'concrete', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'concrete-from-molten-iron', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'refined-concrete', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'landfill', change = 0.05}}
data.raw.technology['engine-productivity'].effects = {{type = 'change-recipe-productivity', recipe = 'engine-unit', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'electric-engine-unit', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'flying-robot-frame', change = 0.05}}
data.raw.technology['oil-processing-productivity'].prerequisites = {'cryogenic-plant'}
data.raw.technology['oil-processing-productivity'].effects = {{type = 'change-recipe-productivity', recipe = 'basic-oil-processing', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'advanced-oil-processing', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'coal-liquefaction', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'lubricant', change = 0.05}}
data.raw.technology['sulfur-processing-productivity'].prerequisites = {'cryogenic-plant'}
data.raw.technology['sulfur-processing-productivity'].effects[1].recipe = 'sulfur'
data.raw.technology['sulfur-processing-productivity'].effects = {{type = 'change-recipe-productivity', recipe = 'sulfur', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'sulfuric-acid', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'explosives', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'cliff-explosives', change = 0.05}}
data.raw.technology['electronics-productivity'].effects = {{type = 'change-recipe-productivity', recipe = 'electronic-circuit', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'copper-cable', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'casting-copper-cable', change = 0.05}}
data.raw.technology['solar-energy-productivity'].effects = {{type = 'change-recipe-productivity', recipe = 'solar-panel', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'accumulator', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'battery', change = 0.05}}
data.raw.technology['railway-productivity'].effects = {{type = 'change-recipe-productivity', recipe = 'rail', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'iron-stick', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'casting-iron-stick', change = 0.05}}
data.raw.technology['automation-productivity'].prerequisites[1] = 'logistics-2'
data.raw.technology['automation-productivity'].effects = {{type = 'change-recipe-productivity', recipe = 'pipe', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'casting-pipe', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'iron-gear-wheel', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'casting-iron-gear-wheel', change = 0.05}, {type = 'change-recipe-productivity', recipe = 'barrel', change = 0.05}}
data.raw.technology['automation-productivity'].icons[1].icon = '__base__/graphics/technology/automation-2.png'
data.raw.technology['automation-productivity'].localised_name = {'phi-cl.combine', {'technology-name.automation'}, ''}
-- GM-VP C 7 SPACE_AGE RESEARCH
for _, v in pairs({'processing-unit-productivity', 'steel-plate-productivity', 'low-density-structure-productivity', 'plastic-bar-productivity', 'rocket-fuel-productivity', 'rocket-part-productivity', 'research-productivity'}) do
if data.raw.technology[v] then
data.raw.technology[v].unit.count_formula = '1000 * (1.5 ^ (L - 1))'
data.raw.technology[v].unit.ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}
data.raw.technology[v].max_level = 10
end
end
-- GM-VP C 1 SPACE_AGE RESEARCH
if data.raw.technology['research-productivity'] and data.raw.technology['research-productivity'].unit then
data.raw.technology['research-productivity'].unit.count_formula = '1500 * (1.5 ^ L)'
data.raw.technology['research-productivity'].unit.ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'military-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'space-science-pack', 1}}
end
-- data.raw.technology['automation-productivity'].localised_name = {'phi-cl.combine', {'technology-name.automation'}, ''}
-- 'metallurgic-science-pack', 'electromagnetic-science-pack', 'cryogenic-science-pack'
-- GM-VP A 1 SPACE_AGE RESEARCH_EFFECT
if data.raw.technology['automation'] and data.raw.technology['automation'].effects then
@@ -405,8 +391,10 @@ if data.raw.technology and items['technology'] and items['technology_reform'] th
if v.unit then
v.research_trigger = nil
v.unit.count = (items['technology_reform'][v.name].unit_count and items['technology_reform'][v.name].unit_count) or v.unit.count
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
v.max_level = (items['technology_reform'][v.name].max_level and items['technology_reform'][v.name].max_level) or v.max_level
end
elseif items['technology'][v.name] then