From 8a941b2c19f824682ce6d7e39d95f096a685c4b1 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 26 Jun 2026 01:15:01 +0900 Subject: [PATCH] . --- PHI-CL/data/b/mbe.lua | 29 ++++++++++++----------------- PHI-CL/data/b/mbm.lua | 29 ++++++++++++----------------- PHI-CL/data/b/mbq.lua | 29 ++++++++++++----------------- 3 files changed, 36 insertions(+), 51 deletions(-) diff --git a/PHI-CL/data/b/mbe.lua b/PHI-CL/data/b/mbe.lua index 543e593..f8b69c2 100644 --- a/PHI-CL/data/b/mbe.lua +++ b/PHI-CL/data/b/mbe.lua @@ -232,24 +232,19 @@ function main_item(source, tier) end function main_recipe(source, tier) - local result_name = source.name .. '-' .. tier + local recipe = table.deepcopy(data.raw.recipe[source.ref_name]) + recipe.name = source.name .. '-' .. tier + recipe.icons = table.deepcopy(data.raw.item[source.ref_name].icons) + recipe.energy_required = 2 + recipe.enabled = false + recipe.categories = {'crafting'} + recipe.ingredients = {{type = 'item', name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name, amount = ((source.tech == 'compound-energy' and (source.type == 'solar-panel' or source.type == 'accumulator')) and tonumber(settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value) or 4) or 2}} + recipe.results = {{type = 'item', name = recipe.name, amount = 1}} + recipe.main_product = recipe.name + recipe.localised_name = {'?', data.raw[source.type][recipe.name].localised_name, ''} + recipe.localised_description = {'?', data.raw[source.type][recipe.name].localised_description, ''} - data:extend({{ - type = 'recipe', - name = result_name, - icons = table.deepcopy(data.raw.item[source.ref_name].icons), - energy_required = 2, - enabled = false, - categories = {'crafting'}, - auto_recycle = data.raw.recipe[source.ref_name].auto_recycle, - maximum_productivity = data.raw.recipe[source.ref_name].maximum_productivity, - surface_conditions = data.raw.recipe[source.ref_name].surface_conditions, - ingredients = {{type = 'item', name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name, amount = ((source.tech == 'compound-energy' and (source.type == 'solar-panel' or source.type == 'accumulator')) and tonumber(settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value) or 4) or 2}}, - results = {{type = 'item', name = result_name, amount = 1}}, - main_product = result_name, - localised_name = {'?', data.raw[source.type][result_name].localised_name, ''}, - localised_description = {'?', data.raw[source.type][result_name].localised_description, ''} - }}) + data:extend({recipe}) end function main_replace_group(source) diff --git a/PHI-CL/data/b/mbm.lua b/PHI-CL/data/b/mbm.lua index f7ccb55..74c56b2 100644 --- a/PHI-CL/data/b/mbm.lua +++ b/PHI-CL/data/b/mbm.lua @@ -356,24 +356,19 @@ function main_item(source, tier) end function main_recipe(source, tier) - local result_name = source.name .. '-' .. tier + local recipe = table.deepcopy(data.raw.recipe[source.ref_name]) + recipe.name = source.name .. '-' .. tier + recipe.icons = table.deepcopy(data.raw.item[source.ref_name].icons) + recipe.energy_required = 2 + recipe.enabled = false + recipe.categories = {'crafting'} + recipe.ingredients = {{type = 'item', name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name, amount = 2}} + recipe.results = {{type = 'item', name = recipe.name, amount = 1}} + recipe.main_product = recipe.name + recipe.localised_name = {'?', data.raw[source.type][recipe.name].localised_name, ''} + recipe.localised_description = {'?', data.raw[source.type][recipe.name].localised_description, ''} - data:extend({{ - type = 'recipe', - name = result_name, - icons = table.deepcopy(data.raw.item[source.ref_name].icons), - energy_required = 2, - enabled = false, - categories = {'crafting'}, - auto_recycle = data.raw.recipe[source.ref_name].auto_recycle, - maximum_productivity = data.raw.recipe[source.ref_name].maximum_productivity, - surface_conditions = data.raw.recipe[source.ref_name].surface_conditions, - ingredients = {{type = 'item', name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name, amount = 2}}, - results = {{type = 'item', name = result_name, amount = 1}}, - main_product = result_name, - localised_name = {'?', data.raw[source.type][result_name].localised_name, ''}, - localised_description = {'?', data.raw[source.type][result_name].localised_description, ''} - }}) + data:extend({recipe}) end function main_technology(source, tier) diff --git a/PHI-CL/data/b/mbq.lua b/PHI-CL/data/b/mbq.lua index 09e1bc1..ec6a081 100644 --- a/PHI-CL/data/b/mbq.lua +++ b/PHI-CL/data/b/mbq.lua @@ -179,24 +179,19 @@ function main_item(source, tier) end function main_recipe(source, tier) - local result_name = source.name .. '-mk' .. tier .. '-equipment' + local recipe = table.deepcopy(data.raw.recipe[source.ref_name]) + recipe.name = source.name .. '-mk' .. tier .. '-equipment' + recipe.icons = table.deepcopy(data.raw.item[source.ref_name].icons) + recipe.energy_required = 2 + recipe.enabled = false + recipe.categories = {'crafting'} + recipe.ingredients = {{type = 'item', name = (tier == source.min and source.ref_name) or (source.name .. '-mk' .. (tier - 1) .. '-equipment'), amount = 2}} + recipe.results = {{type = 'item', name = recipe.name, amount = 1}} + recipe.main_product = recipe.name + recipe.localised_name = {'?', data.raw[source.type][recipe.name].localised_name, ''} + recipe.localised_description = {'?', data.raw[source.type][recipe.name].localised_description, ''} - data:extend({{ - type = 'recipe', - name = result_name, - icons = table.deepcopy(data.raw.item[source.ref_name].icons), - energy_required = 2, - enabled = false, - categories = {'crafting'}, - auto_recycle = data.raw.recipe[source.ref_name].auto_recycle, - maximum_productivity = data.raw.recipe[source.ref_name].maximum_productivity, - surface_conditions = data.raw.recipe[source.ref_name].surface_conditions, - ingredients = {{type = 'item', name = (tier == source.min and source.ref_name) or (source.name .. '-mk' .. (tier - 1) .. '-equipment'), amount = 2}}, - results = {{type = 'item', name = result_name, amount = 1}}, - main_product = result_name, - localised_name = {'?', data.raw[source.type][result_name].localised_name, ''}, - localised_description = {'?', data.raw[source.type][result_name].localised_description, ''} - }}) + data:extend({recipe}) end function main_technology(source, tier)