diff --git a/PHI-MB/config.lua b/PHI-MB/config.lua index b1c4471..d993ec0 100644 --- a/PHI-MB/config.lua +++ b/PHI-MB/config.lua @@ -1,8 +1,8 @@ local items = { ['assembling-machine'] = { enabled = true, + stage = 1, type = 'assembling-machine', - new_type = nil, name = 'assembling-machine', ref_name = 'assembling-machine-3', tech = 'automation-3', @@ -11,8 +11,8 @@ local items = { }, ['electric-furnace'] = { enabled = true, + stage = 1, type = 'furnace', - new_type = nil, name = 'electric-furnace', ref_name = 'electric-furnace', tech = 'advanced-material-processing-2', @@ -21,8 +21,8 @@ local items = { }, ['oil-refinery'] = { enabled = true, + stage = 1, type = 'assembling-machine', - new_type = nil, name = 'oil-refinery', ref_name = 'oil-refinery', tech = 'oil-processing', @@ -31,8 +31,8 @@ local items = { }, ['chemical-plant'] = { enabled = true, + stage = 1, type = 'assembling-machine', - new_type = nil, name = 'chemical-plant', ref_name = 'chemical-plant', tech = 'oil-processing', @@ -41,8 +41,8 @@ local items = { }, ['centrifuge'] = { enabled = true, + stage = 1, type = 'assembling-machine', - new_type = nil, name = 'centrifuge', ref_name = 'centrifuge', tech = 'uranium-processing', @@ -51,8 +51,8 @@ local items = { }, ['lab'] = { enabled = true, + stage = 1, type = 'lab', - new_type = nil, name = 'lab', ref_name = 'lab', tech = 'automation', @@ -63,11 +63,11 @@ local items = { if mods['PHI-RS'] then items['electric-filter-furnace'] = { - enabled = true, + enabled = false, + stage = 2, type = 'assembling-machine', - new_type = 'assembling-machine', name = 'electric-filter-furnace', - ref_name = 'electric-furnace', + ref_name = 'electric-filter-furnace', tech = 'advanced-material-processing-2', min = 2, max = 3 @@ -77,22 +77,22 @@ end if mods['aai-industry'] then items['industrial-furnace'] = { enabled = true, + stage = 2, type = 'assembling-machine', - new_type = nil, name = 'industrial-furnace', ref_name = 'industrial-furnace', - tech = 'automation-3', + tech = 'industrial-furnace', min = 2, max = 3 } items['fuel-processor'] = { enabled = true, + stage = 2, type = 'assembling-machine', - new_type = nil, name = 'fuel-processor', ref_name = 'fuel-processor', - tech = 'automation', + tech = 'fuel-processing', min = 2, max = 3 } @@ -101,66 +101,66 @@ end if mods['space-exploration'] then items['se-space-assembling-machine'] = { enabled = true, + stage = 2, type = 'assembling-machine', - new_type = nil, name = 'se-space-assembling-machine', ref_name = 'se-space-assembling-machine', - tech = 'automation-3', + tech = 'se-space-assembling', min = 2, max = 3 } items['se-space-manufactory'] = { enabled = true, + stage = 2, type = 'assembling-machine', - new_type = nil, name = 'se-space-manufactory', ref_name = 'se-space-manufactory', - tech = 'automation-3', + tech = 'se-space-manufactory', min = 2, max = 3 } items['se-casting-machine'] = { enabled = true, + stage = 2, type = 'assembling-machine', - new_type = nil, name = 'se-casting-machine', ref_name = 'se-casting-machine', - tech = 'automation-3', + tech = 'se-pyroflux-smelting', min = 2, max = 3 } items['se-pulveriser'] = { enabled = true, + stage = 2, type = 'assembling-machine', - new_type = nil, name = 'se-pulveriser', ref_name = 'se-pulveriser', - tech = 'automation-2', + tech = 'se-pulveriser', min = 2, max = 3 } items['se-lifesupport-facility'] = { enabled = true, + stage = 2, type = 'assembling-machine', - new_type = nil, name = 'se-lifesupport-facility', ref_name = 'se-lifesupport-facility', - tech = 'automation-2', + tech = 'se-lifesupport-facility', min = 2, max = 3 } items['se-fuel-refinery'] = { enabled = true, + stage = 2, type = 'assembling-machine', - new_type = nil, name = 'se-fuel-refinery', ref_name = 'se-fuel-refinery', - tech = 'automation', + tech = 'se-fuel-refining', min = 2, max = 3 } diff --git a/PHI-MB/data-final-fixes.lua b/PHI-MB/data-final-fixes.lua new file mode 100644 index 0000000..e69de29 diff --git a/PHI-MB/data-updates.lua b/PHI-MB/data-updates.lua index bdff310..58d0b69 100644 --- a/PHI-MB/data-updates.lua +++ b/PHI-MB/data-updates.lua @@ -1,3 +1,85 @@ +local items = require 'config' + +-- entity +local function EE(source, tier) + local item = table.deepcopy(data.raw[source.type][source.ref_name]) + + item.name = source.name .. '-' .. tier + item.minable.result = source.name .. '-' .. tier + item.max_health = item.max_health * (2 ^ (tier - source.min + 1)) + + if source.type == 'lab' then + item.researching_speed = item.researching_speed * (2 ^ (tier - source.min + 1)) + else + item.crafting_speed = item.crafting_speed * (2 ^ (tier - source.min + 1)) + item.energy_source.emissions_per_minute = item.energy_source.emissions_per_minute * (2 ^ (tier - source.min + 1)) + end + + item.energy_usage = tonumber(string.match(item.energy_usage, '%d+')) * (2 ^ (tier - source.min + 1)) .. 'kW' + -- item.animation.layers[1].filename = graphics_location .. source .. '-e.png' + -- item.animation.layers[1].hr_version.filename = graphics_location .. source ..'-eh.png' + -- item.icon = graphics_location .. source .. '-i.png' + -- item.icon_size = 64 + -- item.icon_mipmaps = 4 + + if (tier <= source.max - 1) then + item.next_upgrade = source.name .. '-' .. (tier + 1) + end + + if (source.new_type ~= nil) then + item.type = source.new_type + end + + data:extend({item}) +end + +-- item +local function EI(source, tier) + local item = table.deepcopy(data.raw.item[source.ref_name]) + + item.name = source.name .. '-' .. tier + item.place_result = source.name .. '-' .. tier + -- item.icons = {{icon = graphics_location .. source .. '-i.png', icon_mipmaps = 4, icon_size = 64}} + item.order = item.order .. tier + data:extend({item}) +end + +-- recipe +local function ER(source, tier) + local na = source.name + + if tier > 2 then + na = na .. '-' .. (tier - 1) + end + + data:extend({{ + type = 'recipe', + name = source.name .. '-' .. tier, + energy_required = 2, + enabled = false, + ingredients = {{na, 2}}, + result = source.name .. '-' .. tier, + }}) +end + +-- tech +local function ET(source, tier) + table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=source.name .. '-' .. tier}) +end + +for _, v in pairs(items) do + if v.enabled then + if v.stage == 2 then + for j=v.min, v.max, 1 do + EE(v, j) + EI(v, j) + ER(v, j) + ET(v, j) + end + end + end +end + -- assembling machine data.raw['assembling-machine']['assembling-machine-4'].fast_replaceable_group = data.raw['assembling-machine']['assembling-machine-3'].fast_replaceable_group data.raw['assembling-machine']['assembling-machine-5'].fast_replaceable_group = data.raw['assembling-machine']['assembling-machine-4'].fast_replaceable_group @@ -27,6 +109,15 @@ data.raw['lab']['lab'].fast_replaceable_group = 'lab' data.raw['lab']['lab-2'].fast_replaceable_group = data.raw['lab']['lab'].fast_replaceable_group data.raw['lab']['lab-3'].fast_replaceable_group = data.raw['lab']['lab-2'].fast_replaceable_group +--[[ +if mods['PHI-RS'] then + data.raw['assembling-machine']['electric-filter-furnace-2'].fast_replaceable_group = data.raw['assembling-machine']['electric-filter-furnace-1'].fast_replaceable_group + data.raw['assembling-machine']['electric-filter-furnace-3'].fast_replaceable_group = data.raw['assembling-machine']['electric-filter-furnace-2'].fast_replaceable_group + + data.raw['assembling-machine']['electric-filter-furnace-2'].crafting_categories = data.raw['furnace']['electric-furnace'].crafting_categories + data.raw['assembling-machine']['electric-filter-furnace-3'].crafting_categories = data.raw['furnace']['electric-furnace'].crafting_categories +end +]] -- aai if mods['aai-industry'] then -- industrial furnace @@ -50,7 +141,7 @@ if mods['space-exploration'] then data.raw['assembling-machine']['se-space-assembling-machine'].fast_replaceable_group = 'space-assembling-machine' data.raw['assembling-machine']['se-space-assembling-machine-2'].fast_replaceable_group = data.raw['assembling-machine']['se-space-assembling-machine'].fast_replaceable_group data.raw['assembling-machine']['se-space-assembling-machine-3'].fast_replaceable_group = data.raw['assembling-machine']['se-space-assembling-machine-2'].fast_replaceable_group - + -- space manufactory data.raw['assembling-machine']['se-space-manufactory'].fast_replaceable_group = 'space-manufactory' data.raw['assembling-machine']['se-space-manufactory-2'].fast_replaceable_group = data.raw['assembling-machine']['se-space-manufactory'].fast_replaceable_group @@ -75,4 +166,4 @@ if mods['space-exploration'] then data.raw['assembling-machine']['se-fuel-refinery'].fast_replaceable_group = 'fuel-refinery' data.raw['assembling-machine']['se-fuel-refinery-2'].fast_replaceable_group = data.raw['assembling-machine']['se-fuel-refinery'].fast_replaceable_group data.raw['assembling-machine']['se-fuel-refinery-3'].fast_replaceable_group = data.raw['assembling-machine']['se-fuel-refinery-2'].fast_replaceable_group -end +end \ No newline at end of file diff --git a/PHI-MB/data.lua b/PHI-MB/data.lua index 4f3a057..8379c71 100644 --- a/PHI-MB/data.lua +++ b/PHI-MB/data.lua @@ -5,7 +5,7 @@ local items = require 'config' -- entity local function EE(source, tier) local item = table.deepcopy(data.raw[source.type][source.ref_name]) - + item.name = source.name .. '-' .. tier item.minable.result = source.name .. '-' .. tier item.max_health = item.max_health * (2 ^ (tier - source.min + 1)) @@ -66,16 +66,18 @@ end -- tech local function ET(source, tier) - table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=source.ref_name .. '-' .. tier}) + table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=source.name .. '-' .. tier}) end for _, v in pairs(items) do if v.enabled then - for j=v.min, v.max, 1 do - EE(v, j) - EI(v, j) - ER(v, j) - ET(v, j) + if v.stage == 1 then + for j=v.min, v.max, 1 do + EE(v, j) + EI(v, j) + ER(v, j) + ET(v, j) + end end end end diff --git a/PHI-MB/locale/en/locale.cfg b/PHI-MB/locale/en/locale.cfg index d683cdc..1942a19 100644 --- a/PHI-MB/locale/en/locale.cfg +++ b/PHI-MB/locale/en/locale.cfg @@ -11,6 +11,8 @@ centrifuge-2=Centrifuge 2 centrifuge-3=Centrifuge 3 lab-2=Lab 2 lab-3=Lab 3 +electric-filter-furnace-2=Electric filter furnace 2 +electric-filter-furnace-3=Electric filter furnace 3 se-space-assembling-machine-2=Space assembling machine 2 se-space-assembling-machine-3=Space assembling machine 3 se-space-manufactory-2=Space manufactory 2 @@ -41,6 +43,8 @@ centrifuge-2=Centrifuge 2 centrifuge-3=Centrifuge 3 lab-2=Lab 2 lab-3=Lab 3 +electric-filter-furnace-2=Electric filter furnace 2 +electric-filter-furnace-3=Electric filter furnace 3 industrial-furnace-2=Industrial furnace 2 industrial-furnace-3=Industrial furnace 3 fuel-processor-2=Fuel processor 2 @@ -71,6 +75,8 @@ centrifuge-2=Processes various uranium-related recipes. centrifuge-3=Processes various uranium-related recipes. lab-2=Lab 2 lab-3=Lab 3 +electric-filter-furnace-2=Faster and more flexible furnaces. +electric-filter-furnace-3=Faster and more flexible furnaces. industrial-furnace-2=Can use advanced smelting and metallurgy recipes but not kiln recipes. industrial-furnace-3=Can use advanced smelting and metallurgy recipes but not kiln recipes. fuel-processor-2=Process any chemical fuels into processed fuel. diff --git a/PHI-MB/locale/ja/locale.cfg b/PHI-MB/locale/ja/locale.cfg index 979befe..03915fb 100644 --- a/PHI-MB/locale/ja/locale.cfg +++ b/PHI-MB/locale/ja/locale.cfg @@ -11,6 +11,8 @@ centrifuge-2=遠心分離機 2 centrifuge-3=遠心分離機 3 lab-2=研究所 2 lab-3=研究所 3 +electric-filter-furnace-2=電気フィルター炉 2 +electric-filter-furnace-3=電気フィルター炉 3 industrial-furnace-2=工業炉 2 industrial-furnace-3=工業炉 3 fuel-processor-2=燃料加工所 2 @@ -41,6 +43,8 @@ centrifuge-2=遠心分離機 2 centrifuge-3=遠心分離機 3 lab-2=研究所 2 lab-3=研究所 3 +electric-filter-furnace-2=電気フィルター炉 2 +electric-filter-furnace-3=電気フィルター炉 3 industrial-furnace-2=工業炉 2 industrial-furnace-3=工業炉 3 fuel-processor-2=燃料加工所 2 @@ -71,6 +75,8 @@ centrifuge-2=様々なウランに関するレシピを処理します。 centrifuge-3=様々なウランに関するレシピを処理します。 lab-2=研究所 2 lab-3=研究所 3 +electric-filter-furnace-2=より高速で便利な炉です。 +electric-filter-furnace-3=より高速で便利な炉です。 industrial-furnace-2=高度な製錬と冶金のレシピを使用できますが、れんがなどを焼けません。 industrial-furnace-3=高度な製錬と冶金のレシピを使用できますが、れんがなどを焼けません。 fuel-processor-2=通常の燃料を加工燃料へと処理します。 diff --git a/PHI-MB/locale/zh-CN/locale.cfg b/PHI-MB/locale/zh-CN/locale.cfg index 249496f..f8117fd 100644 --- a/PHI-MB/locale/zh-CN/locale.cfg +++ b/PHI-MB/locale/zh-CN/locale.cfg @@ -11,6 +11,8 @@ centrifuge-2=離心機 2 centrifuge-3=離心機 3 lab-2=實驗室 2 lab-3=實驗室 3 +electric-filter-furnace-2=智慧電爐 2 +electric-filter-furnace-3=智慧電爐 3 industrial-furnace-2=工業熔爐 2 industrial-furnace-3=工業熔爐 3 fuel-processor-2=燃料加工機 2 @@ -41,6 +43,8 @@ centrifuge-2=離心機 2 centrifuge-3=離心機 3 lab-2=實驗室 2 lab-3=實驗室 3 +electric-filter-furnace-2=智慧電爐 2 +electric-filter-furnace-3=智慧電爐 3 industrial-furnace-2=工業熔爐 2 industrial-furnace-3=工業熔爐 3 fuel-processor-2=燃料加工機 2 @@ -71,6 +75,8 @@ centrifuge-2=加工多種有關鈾的配方。 centrifuge-3=加工多種有關鈾的配方。 lab-2=實驗室 2 lab-3=實驗室 3 +electric-filter-furnace-2=更快速、更方便的熔爐。 +electric-filter-furnace-3=更快速、更方便的熔爐。 industrial-furnace-2=與電爐相比,更大、速度快且具有更多插件插槽。需要選擇配方,但可以處理具有多種輸入和流體的高級的配方。 industrial-furnace-3=與電爐相比,更大、速度快且具有更多插件插槽。需要選擇配方,但可以處理具有多種輸入和流體的高級的配方。 fuel-processor-2=將任何化學燃料製成成加工燃料。 diff --git a/PHI-MB/locale/zh-TW/locale.cfg b/PHI-MB/locale/zh-TW/locale.cfg index 249496f..f8117fd 100644 --- a/PHI-MB/locale/zh-TW/locale.cfg +++ b/PHI-MB/locale/zh-TW/locale.cfg @@ -11,6 +11,8 @@ centrifuge-2=離心機 2 centrifuge-3=離心機 3 lab-2=實驗室 2 lab-3=實驗室 3 +electric-filter-furnace-2=智慧電爐 2 +electric-filter-furnace-3=智慧電爐 3 industrial-furnace-2=工業熔爐 2 industrial-furnace-3=工業熔爐 3 fuel-processor-2=燃料加工機 2 @@ -41,6 +43,8 @@ centrifuge-2=離心機 2 centrifuge-3=離心機 3 lab-2=實驗室 2 lab-3=實驗室 3 +electric-filter-furnace-2=智慧電爐 2 +electric-filter-furnace-3=智慧電爐 3 industrial-furnace-2=工業熔爐 2 industrial-furnace-3=工業熔爐 3 fuel-processor-2=燃料加工機 2 @@ -71,6 +75,8 @@ centrifuge-2=加工多種有關鈾的配方。 centrifuge-3=加工多種有關鈾的配方。 lab-2=實驗室 2 lab-3=實驗室 3 +electric-filter-furnace-2=更快速、更方便的熔爐。 +electric-filter-furnace-3=更快速、更方便的熔爐。 industrial-furnace-2=與電爐相比,更大、速度快且具有更多插件插槽。需要選擇配方,但可以處理具有多種輸入和流體的高級的配方。 industrial-furnace-3=與電爐相比,更大、速度快且具有更多插件插槽。需要選擇配方,但可以處理具有多種輸入和流體的高級的配方。 fuel-processor-2=將任何化學燃料製成成加工燃料。 diff --git a/PHI-MB/migrations/migrations.lua b/PHI-MB/migrations/migrations.lua index 9270571..eb2f6f4 100644 --- a/PHI-MB/migrations/migrations.lua +++ b/PHI-MB/migrations/migrations.lua @@ -1,113 +1,133 @@ -for index, force in pairs(game.forces) do +local items = require '../config' + +for _, force in pairs(game.forces) do local technologies = force.technologies local recipes = force.recipes - - if technologies['automation'].researched then - recipes['lab-2'].enabled = true - recipes['lab-2'].reload() - recipes['lab-3'].enabled = true - recipes['lab-3'].reload() - if recipes['se-fuel-processor'] ~= nil then - if recipes['se-fuel-processor'].enabled then - recipes['fuel-processor-2'].enabled = true - recipes['fuel-processor-2'].reload() - recipes['fuel-processor-3'].enabled = true - recipes['fuel-processor-3'].reload() + for _, v in pairs(items) do + if v.enabled then + if technologies[v.tech] ~= nil then + if technologies[v.tech].researched then + for j=v.min, v.max, 1 do + recipes[v.name .. '-' .. j].enabled = true + recipes[v.name .. '-' .. j].reload() + end + end end end - - if recipes['se-fuel-refinery'] ~= nil then - if recipes['se-fuel-refinery'].enabled then - recipes['se-fuel-refinery-2'].enabled = true - recipes['se-fuel-refinery-2'].reload() - recipes['se-fuel-refinery-3'].enabled = true - recipes['se-fuel-refinery-3'].reload() - end - end - - elseif technologies['automation-2'].researched then - if recipes['se-pulveriser'] ~= nil then - if recipes['se-pulveriser'].enabled then - recipes['se-pulveriser-2'].enabled = true - recipes['se-pulveriser-2'].reload() - recipes['se-pulveriser-3'].enabled = true - recipes['se-pulveriser-3'].reload() - end - end - - if recipes['se-lifesupport-facility'] ~= nil then - if recipes['se-lifesupport-facility'].enabled then - recipes['se-lifesupport-facility-2'].enabled = true - recipes['se-lifesupport-facility-2'].reload() - recipes['se-lifesupport-facility-3'].enabled = true - recipes['se-lifesupport-facility-3'].reload() - end - end - - elseif technologies['automation-3'].researched then - recipes['assembling-machine-4'].enabled = true - recipes['assembling-machine-4'].reload() - recipes['assembling-machine-5'].enabled = true - recipes['assembling-machine-5'].reload() - - if recipes['industrial-furnace'] ~= nil then - if recipes['industrial-furnace'].enabled then - recipes['industrial-furnace-2'].enabled = true - recipes['industrial-furnace-2'].reload() - recipes['industrial-furnace-3'].enabled = true - recipes['industrial-furnace-3'].reload() - end - end - - if recipes['se-space-assembling-machine'] ~= nil then - if recipes['se-space-assembling-machine'].enabled then - recipes['se-space-assembling-machine-2'].enabled = true - recipes['se-space-assembling-machine-2'].reload() - recipes['se-space-assembling-machine-3'].enabled = true - recipes['se-space-assembling-machine-3'].reload() - end - end - - if recipes['se-space-manufactory'] ~= nil then - if recipes['se-space-manufactory'].enabled then - recipes['se-space-manufactory-2'].enabled = true - recipes['se-space-manufactory-2'].reload() - recipes['se-space-manufactory-3'].enabled = true - recipes['se-space-manufactory-3'].reload() - end - end - - if recipes['se-casting-machine'] ~= nil then - if recipes['se-casting-machine'].enabled then - recipes['se-casting-machine-2'].enabled = true - recipes['se-casting-machine-2'].reload() - recipes['se-casting-machine-3'].enabled = true - recipes['se-casting-machine-3'].reload() - end - end - - elseif technologies['advanced-material-processing-2'].researched then - recipes['electric-furnace-2'].enabled = true - recipes['electric-furnace-2'].reload() - recipes['electric-furnace-3'].enabled = true - recipes['electric-furnace-3'].reload() - - elseif technologies['oil-processing'].researched then - recipes['oil-refinery-2'].enabled = true - recipes['oil-refinery-2'].reload() - recipes['oil-refinery-3'].enabled = true - recipes['oil-refinery-3'].reload() - - recipes['chemical-plant-2'].enabled = true - recipes['chemical-plant-2'].reload() - recipes['chemical-plant-3'].enabled = true - recipes['chemical-plant-3'].reload() - - elseif technologies['uranium-processing'].researched then - recipes['centrifuge-2'].enabled = true - recipes['centrifuge-2'].reload() - recipes['centrifuge-3'].enabled = true - recipes['centrifuge-3'].reload() end end + +--[[ +if technologies['automation'].researched then + recipes['lab-2'].enabled = true + recipes['lab-2'].reload() + recipes['lab-3'].enabled = true + recipes['lab-3'].reload() +end + +if technologies['automation-3'].researched then + recipes['assembling-machine-4'].enabled = true + recipes['assembling-machine-4'].reload() + recipes['assembling-machine-5'].enabled = true + recipes['assembling-machine-5'].reload() +end + +if technologies['advanced-material-processing-2'].researched then + recipes['electric-furnace-2'].enabled = true + recipes['electric-furnace-2'].reload() + recipes['electric-furnace-3'].enabled = true + recipes['electric-furnace-3'].reload() +end + +if technologies['oil-processing'].researched then + recipes['oil-refinery-2'].enabled = true + recipes['oil-refinery-2'].reload() + recipes['oil-refinery-3'].enabled = true + recipes['oil-refinery-3'].reload() + + recipes['chemical-plant-2'].enabled = true + recipes['chemical-plant-2'].reload() + recipes['chemical-plant-3'].enabled = true + recipes['chemical-plant-3'].reload() +end + +if technologies['uranium-processing'].researched then + recipes['centrifuge-2'].enabled = true + recipes['centrifuge-2'].reload() + recipes['centrifuge-3'].enabled = true + recipes['centrifuge-3'].reload() +end + +if technologies['industrial-furnace'] ~= nil then + if technologies['industrial-furnace'].researched then + recipes['industrial-furnace-2'].enabled = true + recipes['industrial-furnace-2'].reload() + recipes['industrial-furnace-3'].enabled = true + recipes['industrial-furnace-3'].reload() + end +end + +if technologies['fuel-processing'] ~= nil then + if technologies['fuel-processing'].researched then + recipes['fuel-processor-2'].enabled = true + recipes['fuel-processor-2'].reload() + recipes['fuel-processor-3'].enabled = true + recipes['fuel-processor-3'].reload() + end +end + +if technologies['se-space-assembling'] ~= nil then + if technologies['se-space-assembling'].researched then + recipes['se-space-assembling-machine-2'].enabled = true + recipes['se-space-assembling-machine-2'].reload() + recipes['se-space-assembling-machine-3'].enabled = true + recipes['se-space-assembling-machine-3'].reload() + end +end + +if technologies['se-space-manufactory'] ~= nil then + if technologies['se-space-manufactory'].researched then + recipes['se-space-manufactory-2'].enabled = true + recipes['se-space-manufactory-2'].reload() + recipes['se-space-manufactory-3'].enabled = true + recipes['se-space-manufactory-3'].reload() + end +end + +if technologies['se-pyroflux-smelting'] ~= nil then + if technologies['se-pyroflux-smelting'].researched then + recipes['se-casting-machine-2'].enabled = true + recipes['se-casting-machine-2'].reload() + recipes['se-casting-machine-3'].enabled = true + recipes['se-casting-machine-3'].reload() + end +end + +if technologies['se-pulveriser'] ~= nil then + if technologies['se-pulveriser'].researched then + recipes['se-pulveriser-2'].enabled = true + recipes['se-pulveriser-2'].reload() + recipes['se-pulveriser-3'].enabled = true + recipes['se-pulveriser-3'].reload() + end +end + +if technologies['se-lifesupport-facility'] ~= nil then + if technologies['se-lifesupport-facility'].researched then + recipes['se-lifesupport-facility-2'].enabled = true + recipes['se-lifesupport-facility-2'].reload() + recipes['se-lifesupport-facility-3'].enabled = true + recipes['se-lifesupport-facility-3'].reload() + end +end + +if technologies['se-fuel-refining'] ~= nil then + if technologies['se-fuel-refining'].researched then + recipes['se-fuel-refinery-2'].enabled = true + recipes['se-fuel-refinery-2'].reload() + recipes['se-fuel-refinery-3'].enabled = true + recipes['se-fuel-refinery-3'].reload() + end +end +]] \ No newline at end of file diff --git a/PHI-RS/data-updates.lua b/PHI-RS/data-updates.lua index ec34176..e96f294 100644 --- a/PHI-RS/data-updates.lua +++ b/PHI-RS/data-updates.lua @@ -1,3 +1,4 @@ -- electric furnace data.raw['furnace']['electric-furnace'].fast_replaceable_group = 'electric-furnace' data.raw['assembling-machine']['electric-filter-furnace-1'].fast_replaceable_group = data.raw['furnace']['electric-furnace'].fast_replaceable_group +data.raw['assembling-machine']['electric-filter-furnace-1'].crafting_categories = data.raw['furnace']['electric-furnace'].crafting_categories diff --git a/PHI-RS/migrations/migrations.lua b/PHI-RS/migrations/migrations.lua new file mode 100644 index 0000000..66fda1d --- /dev/null +++ b/PHI-RS/migrations/migrations.lua @@ -0,0 +1,9 @@ +for index, force in pairs(game.forces) do + local technologies = force.technologies + local recipes = force.recipes + + if technologies['advanced-material-processing-2'].researched then + recipes['electric-filter-furnace'].enabled = true + recipes['electric-filter-furnace'].reload() + end +end