diff --git a/PHI-CL/data/b/gm-vp.lua b/PHI-CL/data/b/gm-vp.lua index af4d10f..baca715 100644 --- a/PHI-CL/data/b/gm-vp.lua +++ b/PHI-CL/data/b/gm-vp.lua @@ -1,4 +1,5 @@ local items = require('gm-vp-c') +local mbm = require('mbm-c') local item_sounds = require('__base__/prototypes/item_sounds') if not mods['space-age'] then @@ -406,3 +407,13 @@ if data.raw.technology and items['technology'] and items['technology_reform'] th end end end + +if settings.startup['PHI-MB-MACHINE'].value and settings.startup['PHI-MB-MACHINE'].value > 1 and mbm and data.raw.technology and data.raw.recipe then + for i = 2, settings.startup['PHI-MB-MACHINE'].value do + for _, v in pairs({'foundry', 'electromagnetic-plant', 'cryogenic-plant'}) do + if mbm[v] and mbm[v].max and mbm[v].max >= i and mbm[v].tech and data.raw.technology[mbm[v].tech] and data.raw.recipe[v .. '-' .. i] then + table.insert(data.raw.technology[mbm[v].tech].effects, {type = 'unlock-recipe', recipe = v .. '-' .. i}) + end + end + end +end diff --git a/PHI-CL/data/b/mbm.lua b/PHI-CL/data/b/mbm.lua index 94fad5b..742dfdf 100644 --- a/PHI-CL/data/b/mbm.lua +++ b/PHI-CL/data/b/mbm.lua @@ -25,4 +25,5 @@ end for i = 4, settings.startup['PHI-MB-MACHINE'].value + 2 do data.raw['assembling-machine']['assembling-machine-' .. i].localised_name = {'phi-cl.combine', {'?', {'entity-name.assembling-machine'}, {'name.assembling-machine'}}, tostring(i)} + data.raw['item']['assembling-machine-' .. i].localised_name = {'phi-cl.combine', {'?', {'entity-name.assembling-machine'}, {'name.assembling-machine'}}, tostring(i)} end