From b0fce41381c0108824c1f48e1d46c969ff1916dc Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Wed, 22 Oct 2025 20:29:22 +0200 Subject: [PATCH 1/5] Fix booleans being strings --- IntermediatesForYou2/data-util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IntermediatesForYou2/data-util.lua b/IntermediatesForYou2/data-util.lua index 81def01..a20f4b8 100644 --- a/IntermediatesForYou2/data-util.lua +++ b/IntermediatesForYou2/data-util.lua @@ -855,8 +855,8 @@ function util.replace_ingredients_prior_to(tech, old, new, multiplier) end util.remove_prior_unlocks(tech, old) for i, recipe in pairs(data.raw.recipe) do - if (recipe.enabled and recipe.enabled ~= 'false') - and (not recipe.hidden or recipe.hidden == 'true') -- probably don't want to change hidden recipes + if (recipe.enabled and recipe.enabled ~= false) + and (not recipe.hidden or recipe.hidden == true) -- probably don't want to change hidden recipes and string.sub(recipe.name, 1, 3) ~= 'se-' -- have to exlude SE in general :( then -- log("BZZZ due to 'enabled' replacing " .. old .. " with " .. new .." in " .. recipe.name) -- Handy Debug :| From 92b6c5e2c1a92c30ad6b27800b5c1b4c5cbe7650 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Wed, 22 Oct 2025 20:29:27 +0200 Subject: [PATCH 2/5] Formatting --- IntermediatesForYou2/prototypes/recipes.lua | 72 ++++++++++----------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/IntermediatesForYou2/prototypes/recipes.lua b/IntermediatesForYou2/prototypes/recipes.lua index 4a9724b..b76ad73 100644 --- a/IntermediatesForYou2/prototypes/recipes.lua +++ b/IntermediatesForYou2/prototypes/recipes.lua @@ -12,50 +12,50 @@ 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["248k-Redux"] 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 = "charged-crystal-imersite-powder", - icons = - { - { icon = "__Krastorio2Assets__/icons/items/imersite-powder.png", icon_size = 64}, - { icon = "__248k-Redux-graphics__/ressources/fusion/fu_materials/fu_materials_energy_crystal_charged.png", icon_size = 64, scale=0.3, shift= {-8, -8}}, - }, - category = "kr-crushing", - order = "a-a-a-1", + name = "advanced-electronic-components", + category = "crafting", + order = "e03", enabled = false, energy_required = 4, - ingredients = {{type="item", name="fu_materials_energy_charged_crystal", amount=1}}, - results = {{type="item", name="kr-imersite-powder", amount=2}}, + ingredients = electronic_ingredients, + results = {{type="item", name="advanced-electronic-components", amount=2}}, } }) - util.add_unlock("kr-imersium-processing", "charged-crystal-imersite-powder") -end + if mods["248k-Redux"] then + data:extend({ + { + type = "recipe", + name = "charged-crystal-imersite-powder", + icons = + { + { icon = "__Krastorio2Assets__/icons/items/imersite-powder.png", icon_size = 64}, + { icon = "__248k-Redux-graphics__/ressources/fusion/fu_materials/fu_materials_energy_crystal_charged.png", icon_size = 64, scale=0.3, shift= {-8, -8}}, + }, + category = "kr-crushing", + order = "a-a-a-1", + enabled = false, + energy_required = 4, + ingredients = {{type="item", name="fu_materials_energy_charged_crystal", amount=1}}, + results = {{type="item", name="kr-imersite-powder", amount=2}}, + } + }) + util.add_unlock("kr-imersium-processing", "charged-crystal-imersite-powder") + end -util.add_unlock("processing-unit", "advanced-electronic-components") + util.add_unlock("processing-unit", "advanced-electronic-components") end local turret_large_base_ingredients = {(data.raw.item["tantalum-titanium-beam"] and {type="item", name="tantalum-titanium-beam", amount=60}) or {type="item", name="steel-plate", amount=60}, {type="item", name="concrete", amount=60}} From e8ca9077799835b87eceaad9bc644733a1c4bc92 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Fri, 24 Oct 2025 12:00:43 +0200 Subject: [PATCH 3/5] Fix crash when K2 and bzgold are active --- IntermediatesForYou2/prototypes/recipes.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IntermediatesForYou2/prototypes/recipes.lua b/IntermediatesForYou2/prototypes/recipes.lua index b76ad73..71900c2 100644 --- a/IntermediatesForYou2/prototypes/recipes.lua +++ b/IntermediatesForYou2/prototypes/recipes.lua @@ -8,7 +8,12 @@ end if mods["Krastorio2"] then local electronic_ingredients = {{type="item", name="kr-electronic-components", amount=3}} if mods["bzgold2"] then - electronic_ingredients = {{type="item", name="kr-electronic-components", amount=1}, (mods["ThemTharHills-Updated"] and {type="item", name="integrated-circuit", amount=5}) or (mods["MDbobelectronics2"] and {type="item", name="intergrated-electronics", amount=2}), {type="item", name="cpu", amount=1}} + electronic_ingredients = {{type="item", name="kr-electronic-components", amount=1}, {type="item", name="cpu", amount=1}} + if mods["ThemTharHills-Updated"] then + table.insert(electronic_ingredients, {type="item", name="integrated-circuit", amount=5}) + elseif mods["MDbobelectronics2"] then + table.insert(electronic_ingredients, {type="item", name="intergrated-electronics", amount=2}) + end 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 From a396106c92c168f8a4b37e117ea69733c35c9965 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Sat, 1 Nov 2025 23:08:35 +0100 Subject: [PATCH 4/5] 2.0.4 --- IntermediatesForYou2/changelog.txt | 5 +++++ IntermediatesForYou2/info.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/IntermediatesForYou2/changelog.txt b/IntermediatesForYou2/changelog.txt index 0ad9cda..dab3ffa 100644 --- a/IntermediatesForYou2/changelog.txt +++ b/IntermediatesForYou2/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 2.0.4 +Date: 01.11.2025 + Bug Fixes: + - Fix crash when K2 and bzgold are active +--------------------------------------------------------------------------------------------------- Version: 2.0.3 Date: 21.10.2025 Changes: diff --git a/IntermediatesForYou2/info.json b/IntermediatesForYou2/info.json index 95d7b1b..fd7ca4d 100644 --- a/IntermediatesForYou2/info.json +++ b/IntermediatesForYou2/info.json @@ -1,6 +1,6 @@ { "name": "IntermediatesForYou2", - "version": "2.0.3", + "version": "2.0.4", "factorio_version": "2.0", "title": "IntermediatesForYou", "description": "This mod adds some intermediates and is intented to be played with my other mods.\n\nThis mod is inspired by Brevven's BZ mods.", From 4a6fdf43dc20739fa42d04bdf8aff9b9d8a7c3f6 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 24 Nov 2025 22:05:14 +0100 Subject: [PATCH 5/5] Fix recipe name for bronze-spring --- IntermediatesForYou2/prototypes/recipes.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/IntermediatesForYou2/prototypes/recipes.lua b/IntermediatesForYou2/prototypes/recipes.lua index 71900c2..f3e878f 100644 --- a/IntermediatesForYou2/prototypes/recipes.lua +++ b/IntermediatesForYou2/prototypes/recipes.lua @@ -200,6 +200,7 @@ data:extend({ { type = "recipe", name = "bronze-spring", + localised_name = { "item-name.bronze-spring" }, category = "crafting", order = "s2[spring]", enabled = false,