From 9ccae8427034127480681a48a289ca63a28d5be8 Mon Sep 17 00:00:00 2001 From: Simon Brodtmann Date: Mon, 20 Oct 2025 23:39:19 +0200 Subject: [PATCH] Update bz mods to version 2 --- data-util.lua | 2 +- info.json | 10 +++++----- tin-enriched.lua | 2 +- tin-recipe-updates.lua | 12 ++++++------ tin-recipe.lua | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/data-util.lua b/data-util.lua index 87a0816..6684519 100644 --- a/data-util.lua +++ b/data-util.lua @@ -99,7 +99,7 @@ if get_setting("bz-recipe-bypass") then end function util.is_foundry() - return mods.bzfoundry and not me.get_setting("bzfoundry-minimal") + return mods.bzfoundry2 and not me.get_setting("bzfoundry-minimal") end function should_force(options) diff --git a/info.json b/info.json index 9aa1d71..a73284c 100644 --- a/info.json +++ b/info.json @@ -8,13 +8,13 @@ "homepage": "", "dependencies": [ "base >= 1.1.0", - "? bzfoundry >= 0.2.1", + "? bzfoundry2 >= 2.0.0", "? bztitanium >= 1.2.0", - "? bzlead >= 1.2.0", + "? bzlead2 >= 2.0.29", "? bzzirconium >= 0.6.0", - "? bztungsten >= 0.6.0", - "? bzcarbon >= 0.5.5", - "? bzaluminum >= 0.4.9", + "? bztungsten2 >= 2.0.0", + "? bzcarbon2 >= 2.0.22", + "? bzaluminum2 >= 0.4.9", "? space-exploration >= 0.5.100", "(?) aai-industry", "? aai-industry", diff --git a/tin-enriched.lua b/tin-enriched.lua index 5b6d218..211737e 100644 --- a/tin-enriched.lua +++ b/tin-enriched.lua @@ -34,7 +34,7 @@ data:extend( subgroup = "raw-material", ingredients = { - mods.bzcarbon and {type = "item", name = "graphite", amount = 1} + mods["bzcarbon2"] and {type = "item", name = "graphite", amount = 1} or {type = "fluid", name = "sulfuric-acid", amount = 3}, {type = "fluid", name = "water", amount = 25, catalyst_amount = 25}, {type = "item", name = "tin-ore", amount = 9} diff --git a/tin-recipe-updates.lua b/tin-recipe-updates.lua index 3f4b5f4..8a957fa 100644 --- a/tin-recipe-updates.lua +++ b/tin-recipe-updates.lua @@ -3,7 +3,7 @@ local util = require("data-util"); -- Space Age -if mods.bzlead and data.raw.item["lead-expansion-bolt"] then +if mods["bzlead2"] and data.raw.item["lead-expansion-bolt"] then util.replace_product("scrap-recycling", "lead-expansion-bolt", "solder") else util.add_product("scrap-recycling", util.item("solder", 1, .01)) @@ -36,7 +36,7 @@ util.add_ingredient("slowdown-capsule", "organotins", 5) util.set_category("poison-capsule", "crafting-with-fluid") util.set_category("slowdown-capsule", "crafting-with-fluid") -util.replace_ingredient("pipe-to-ground", mods.bzlead and "lead-plate" or "iron-plate", "solder", 4) +util.replace_ingredient("pipe-to-ground", mods["bzlead2"] and "lead-plate" or "iron-plate", "solder", 4) util.remove_ingredient("chemical-plant", "tungsten-plate") -- keep ingredients managable util.replace_some_ingredient("advanced-circuit", "copper-cable", 1, "solder", 1) @@ -61,8 +61,8 @@ if mods.Krastorio2 then util.add_product("kr-glass", {type="item", name="tin-plate", amount=1, catalyst_amount=1, probability=0.8}) util.set_main_product("kr-glass", "kr-glass") else - if mods.bzfoundry then - if not mods.bzaluminum then + if mods.bzfoundry2 then + if not mods.bzaluminum2 then util.multiply_recipe("glass-from-sand", 4) -- aai util.multiply_recipe("sng-glass-plate", 4) -- sand and glass end @@ -165,7 +165,7 @@ if util.me.use_bronze() then util.add_ingredient("maraxsis-nuclear-submarine", "bronze-plate", 10) util.add_ingredient("maraxsis-salt-reactor", "bronze-plate", 10) util.add_ingredient("maraxsis-hydro-plant", "bronze-plate", 10) - local fast_i = mods.bzaluminum and "aluminum-plate" or "iron-plate" + local fast_i = mods.bzaluminum2 and "aluminum-plate" or "iron-plate" util.replace_some_ingredient("fast-inserter", fast_i, 1, "bronze-plate", 1) if mods.Krastorio2 then util.replace_ingredient("kr-steel-pump", "steel-beam", "bronze-plate", 4) @@ -181,7 +181,7 @@ if util.me.use_bronze() then end -if mods.bztungsten and not mods.bzaluminum then +if mods.bztungsten2 and not mods.bzaluminum2 then util.replace_ingredient("small-lamp", "copper-cable", "tinned-cable") util.add_prerequisite("optics", "tinned-cable") end diff --git a/tin-recipe.lua b/tin-recipe.lua index c8ae830..f9ea15b 100644 --- a/tin-recipe.lua +++ b/tin-recipe.lua @@ -65,7 +65,7 @@ data:extend({ local solder_ingredients = {util.item("tin-plate", 4), util.item("copper-plate", 1)} local solder_casting = {util.fluid("molten-tin", 40), util.fluid("molten-copper", 10)} -if mods.bzlead then +if mods["bzlead2"] then solder_ingredients = {util.item("tin-plate", 3), util.item("lead-plate", 2)} solder_casting = {util.fluid("molten-tin", 30), util.fluid("molten-lead", 20)} end @@ -126,7 +126,7 @@ data:extend({ icons = { {icon = "__bztin__/graphics/icons/solder.png", icon_size = 128, scale = 0.33, shift = {0,-6}}, {icon = "__bztin__/graphics/icons/tin-plate.png", icon_size = 128, scale = 0.25, shift = {-6,4}}, - mods.bzlead and {icon = "__bzlead__/graphics/icons/lead-plate.png", icon_size = 64, scale = 0.5, shift = {6,4}} or + mods["bzlead2"] and {icon = "__bzlead2__/graphics/icons/lead-plate.png", icon_size = 64, scale = 0.5, shift = {6,4}} or {icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, scale = 0.5, shift = {6,4}}, }, effects = {}, @@ -143,7 +143,7 @@ data:extend({ }) util.add_effect("foundry", { type = "unlock-recipe", recipe = "casting-solder" }) end -if mods.bzaluminum and not mods.bzlead then +if mods.bzaluminum2 and not mods["bzlead2"] then data:extend({ { type = "technology", @@ -306,7 +306,7 @@ data:extend({ for item, count in pairs(bronze_i) do util.add_ingredient("bronze-plate", item, count, {force=true}) end -if mods.bzfoundry and data.raw.item["foundry"] then +if mods.bzfoundry2 and data.raw.item["foundry"] then util.add_effect("foundry", { type = "unlock-recipe", recipe = "bronze-plate" }) util.add_prerequisite("fast-inserter", "foundry") util.set_to_founding("bronze-plate", {force=true})