diff --git a/PHI-CL/data/b/gm-c.lua b/PHI-CL/data/b/gm-c.lua new file mode 100644 index 0000000..f7c2425 --- /dev/null +++ b/PHI-CL/data/b/gm-c.lua @@ -0,0 +1,29 @@ +local items = { + ['recipe_reform'] = { + -- BASE 0 + ['atomic-bomb'] = { + ingredients = {{type = 'item', name = 'explosives', amount = 10}, {type = 'item', name = 'processing-unit', amount = 10}, {type = 'item', name = 'uranium-235', amount = 30}} + }, + ['cliff-explosives'] = { + ingredients = {{type = 'item', name = 'explosives', amount = 10}, {type = 'item', name = 'grenade', amount = 1}, {type = 'item', name = 'barrel', amount = 1}} + }, + ['artillery-turret'] = { + ingredients = {{type = 'item', name = 'steel-plate', amount = 60}, {type = 'item', name = 'concrete', amount = 60}, {type = 'item', name = 'iron-gear-wheel', amount = 40}, {type = 'item', name = 'advanced-circuit', amount = 20}} + }, + ['artillery-shell'] = { + ingredients = {{type = 'item', name = 'explosive-cannon-shell', amount = 4}, {type = 'item', name = 'radar', amount = 1}, {type = 'item', name = 'explosives', amount = 8}} + }, + ['artillery-wagon'] = { + ingredients = {{type = 'item', name = 'engine-unit', amount = 64}, {type = 'item', name = 'iron-gear-wheel', amount = 10}, {type = 'item', name = 'steel-plate', amount = 40}, {type = 'item', name = 'pipe', amount = 16}, {type = 'item', name = 'advanced-circuit', amount = 20}} + }, + -- BASE 5 + -- SPACE_AGE 0 + ['foundation'] = { + categories = {'crafting'}, + ingredients = {{type = 'item', name = 'landfill', amount = 1}, {type = 'item', name = 'refined-concrete', amount = 10}, {type = 'item', name = 'steel-plate', amount = 10}}, + results = {{type = 'item', name = 'foundation', amount = 1}} + } + }, +} + +return items diff --git a/PHI-CL/data/b/gm-vp.lua b/PHI-CL/data/b/gm-vp.lua index b936338..a03c811 100644 --- a/PHI-CL/data/b/gm-vp.lua +++ b/PHI-CL/data/b/gm-vp.lua @@ -418,7 +418,7 @@ end -- GM-VP C 27 BASE RESEARCH -- GM-VP C 39 SPACE_AGE RESEARCH -if data.raw.technology and items['technology'] and items['technology_reform'] then +if items['technology_reform'] then for _, v in pairs(data.raw.technology) do 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 diff --git a/PHI-CL/data/b/gm.lua b/PHI-CL/data/b/gm.lua index abbe94f..3f2b57c 100644 --- a/PHI-CL/data/b/gm.lua +++ b/PHI-CL/data/b/gm.lua @@ -1,3 +1,4 @@ +local items = require('gm-c') -- GM C 1 SPACE_AGE ENTITY if data.raw['cargo-bay'] and data.raw['cargo-bay']['cargo-bay'] then @@ -24,13 +25,6 @@ if data.raw['cargo-wagon'] and data.raw['cargo-wagon']['cargo-wagon'] then data.raw['cargo-wagon']['cargo-wagon'].inventory_size = math.max(80, data.raw['cargo-wagon']['cargo-wagon'].inventory_size or 0) end --- GM C 1 SPACE_AGE RECIPE -if data.raw.recipe['foundation'] then - data.raw.recipe['foundation'].categories = {'crafting'} - data.raw.recipe['foundation'].ingredients = {{type = 'item', name = 'landfill', amount = 1}, {type = 'item', name = 'refined-concrete', amount = 10}, {type = 'item', name = 'steel-plate', amount = 10}} - data.raw.recipe['foundation'].results = {{type = 'item', name = 'foundation', amount = 1}} -end - -- GM-SAP C 2 SPACE_AGE RESOURCE for _, v in pairs({'lithium-brine', 'fluorine-vent'}) do if data.raw.resource[v] then @@ -41,35 +35,18 @@ for _, v in pairs({'lithium-brine', 'fluorine-vent'}) do end end --- GM C 1 BASE RECIPE -if data.raw.recipe['atomic-bomb'] then - for _, v in pairs(data.raw.recipe['atomic-bomb'].ingredients) do - if v.name == 'uranium-235' then - v.amount = math.min(v.amount, 30) +-- GM C 5 BASE RECIPE +-- GM C 1 SPACE_AGE RECIPE +if items['recipe_reform'] then + for r, t in pairs(items['recipe_reform']) do + if data.raw.recipe[r] then + for k, v in pairs(t) do + data.raw.recipe[r][k] = v + end end end end --- GM C 1 BASE RECIPE -if data.raw.recipe['cliff-explosives'] then - data.raw.recipe['cliff-explosives'].ingredients = {{type = 'item', name = 'explosives', amount = 10}, {type = 'item', name = 'grenade', amount = 1}, {type = 'item', name = 'barrel', amount = 1}} -end - --- GM C 1 BASE RECIPE -if data.raw.recipe['artillery-turret'] then - data.raw.recipe['artillery-turret'].ingredients = {{type = 'item', name = 'steel-plate', amount = 60}, {type = 'item', name = 'concrete', amount = 60}, {type = 'item', name = 'iron-gear-wheel', amount = 40}, {type = 'item', name = 'advanced-circuit', amount = 20}} -end - --- GM C 1 BASE RECIPE -if data.raw.recipe['artillery-shell'] then - data.raw.recipe['artillery-shell'].ingredients = {{type = 'item', name = 'explosive-cannon-shell', amount = 4}, {type = 'item', name = 'radar', amount = 1}, {type = 'item', name = 'explosives', amount = 8}} -end - --- GM C 1 BASE RECIPE -if data.raw.recipe['artillery-wagon'] then - data.raw.recipe['artillery-wagon'].ingredients = {{type = 'item', name = 'engine-unit', amount = 64}, {type = 'item', name = 'iron-gear-wheel', amount = 10}, {type = 'item', name = 'steel-plate', amount = 40}, {type = 'item', name = 'pipe', amount = 16}, {type = 'item', name = 'advanced-circuit', amount = 20}} -end - -- GM C 1 BASE ITEM if data.raw.ammo['artillery-shell'] then data.raw.ammo['artillery-shell'].stack_size = data.raw['inserter']['stack-inserter'].max_belt_stack_size