From 3f2c03d598445ce54385d00c839e9da44120a874 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Wed, 28 Jan 2026 23:23:29 +0100 Subject: [PATCH] advanced-electronic-components is only added if either MDbobelectronics2 or ThemTharHills-Updated is active --- IntermediatesForYou2/prototypes/recipes.lua | 46 +++++++++++---------- IntermediatesForYou2/recipe-modify.lua | 2 +- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/IntermediatesForYou2/prototypes/recipes.lua b/IntermediatesForYou2/prototypes/recipes.lua index 64e4995..2b5176a 100644 --- a/IntermediatesForYou2/prototypes/recipes.lua +++ b/IntermediatesForYou2/prototypes/recipes.lua @@ -17,28 +17,30 @@ if mods["Krastorio2"] then elseif mods["MDbobelectronics2"] then electronic_ingredients = {{type="item", name="kr-electronic-components", amount=1}, {type="item", name="intergrated-electronics", amount=2}, {type="item", name="processing-electronics", amount=1}} end - data:extend({ - { - type = "item", - name = "advanced-electronic-components", - icon = "__IntermediatesForYou2__/graphics/icons/advanced-electronic-components.png", - icon_size = 64, - group = "kr-electronic-components", - subgroup = "intermediate-product", - order = "e03", - stack_size = 100, - }, - { - type = "recipe", - name = "advanced-electronic-components", - category = "crafting", - order = "e03", - enabled = false, - energy_required = 4, - ingredients = electronic_ingredients, - results = {{type="item", name="advanced-electronic-components", amount=2}}, - } - }) + if mods["MDbobelectronics2"] or mods["ThemTharHills-Updated"] then + data:extend({ + { + type = "item", + name = "advanced-electronic-components", + icon = "__IntermediatesForYou2__/graphics/icons/advanced-electronic-components.png", + icon_size = 64, + group = "kr-electronic-components", + subgroup = "intermediate-product", + order = "e03", + stack_size = 100, + }, + { + type = "recipe", + name = "advanced-electronic-components", + category = "crafting", + order = "e03", + enabled = false, + energy_required = 4, + ingredients = electronic_ingredients, + results = {{type="item", name="advanced-electronic-components", amount=2}}, + } + }) + end if mods["248k-Redux"] then data:extend({ { diff --git a/IntermediatesForYou2/recipe-modify.lua b/IntermediatesForYou2/recipe-modify.lua index 2d52475..e80b3c4 100644 --- a/IntermediatesForYou2/recipe-modify.lua +++ b/IntermediatesForYou2/recipe-modify.lua @@ -143,7 +143,7 @@ if mods["bobassembly"] then end --electronics -if (mods["MDbobelectronics2"] and mods["Krastorio2"]) or false then +if mods["MDbobelectronics2"] and mods["Krastorio2"] then util.replace_ingredient("kr-electronic-components", "plastic-bar", "basic-electronic-components") util.replace_ingredient("kr-electronic-components", mods["Krastorio2"] and "kr-glass" or "glass", "BOBMD-electronic-components") util.remove_ingredient("kr-electronic-components", "silicon-wafer")