From b91b89e10997196b1879689feabeaf28d67563a7 Mon Sep 17 00:00:00 2001 From: pla Date: Fri, 31 Oct 2025 15:11:34 +0100 Subject: [PATCH 1/2] make use of the make_deconversion_recipe funtion in K2 --- bzgold2/data-util.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bzgold2/data-util.lua b/bzgold2/data-util.lua index 33619f2..8c0697f 100644 --- a/bzgold2/data-util.lua +++ b/bzgold2/data-util.lua @@ -168,7 +168,11 @@ function util.k2matter(params) }, }) end - matter.make_recipes(params.k2matter) + if params.k2matter.only_deconversion then + matter.make_deconversion_recipe(params.k2matter) + else + matter.make_recipes(params.k2matter) + end end From 4b691d654c58df784504e56026b96ac43bf7c6ec Mon Sep 17 00:00:00 2001 From: pla Date: Fri, 31 Oct 2025 15:12:33 +0100 Subject: [PATCH 2/2] Fix K2 matter to silver only when bzgold-silver setting is is enabled --- bzgold2/matter.lua | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/bzgold2/matter.lua b/bzgold2/matter.lua index 336b06c..827fee0 100644 --- a/bzgold2/matter.lua +++ b/bzgold2/matter.lua @@ -1,7 +1,7 @@ -- Matter recipes for Krastorio2 if mods["Krastorio2"] then local util = require("data-util") - + if not data.raw.recipe["kr-gold-ore-to-matter"] then util.k2matter({ k2matter = { @@ -12,19 +12,20 @@ if mods["Krastorio2"] then needs_stabilizer = false, unlocked_by = "gold-matter-processing", }, - icon = {icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 0.5} + icon = { icon = "__bzgold2__/graphics/icons/gold-ore.png", icon_size = 128, scale = 0.5 }, + }) + end + if settings["bzgold-silver"].value then + util.k2matter({ + k2matter = { + material = { type = "item", name = "silver-ore", amount = 8 }, + item_name = "silver-ore", + matter_count = 8, + energy_required = 5, + needs_stabilizer = false, + unlocked_by = "silver-matter-processing", + }, + icon = { icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 0.5 }, }) end - - util.k2matter({ - k2matter = { - material = { type = "item", name = "silver-ore", amount = 8 }, - item_name = "silver-ore", - matter_count = 8, - energy_required = 5, - needs_stabilizer = false, - unlocked_by = "silver-matter-processing", - }, - icon = {icon = "__bzgold2__/graphics/icons/silver-ore.png", icon_size = 128, scale = 0.5} - }) end