From c38bf325907b688f31f4af80a3646f881ee7d369 Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 7 Jun 2021 00:31:38 -0700 Subject: [PATCH] zr compat --- tungsten-recipe-updates.lua | 15 ++++++++++++--- tungsten-recipe.lua | 27 ++++++++++++--------------- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/tungsten-recipe-updates.lua b/tungsten-recipe-updates.lua index 326d97f..87ae1e9 100644 --- a/tungsten-recipe-updates.lua +++ b/tungsten-recipe-updates.lua @@ -102,7 +102,11 @@ if mods["Krastorio2"] then util.replace_some_ingredient("kr-advanced-furnace", "rare-metals", 40, "tungsten-plate", 40) -- Other - util.add_ingredient("matter-research-data", "tungsten-plate", 5) + if mods.bzzirconium then + util.add_ingredient("matter-research-data", "zirconium-tungstate", 5) + else + util.add_ingredient("matter-research-data", "tungsten-plate", 5) + end -- Ammunition util.replace_ingredient("piercing-rounds-magazine", "steel-plate", "tungsten-plate") @@ -136,8 +140,13 @@ if mods["space-exploration"] then -- Data util.add_ingredient("se-electromagnetic-field-data", "tungsten-plate", 1) util.add_product("se-electromagnetic-field-data", {name="tungsten-plate", amount=1, probability=0.95}) - util.add_ingredient("se-hot-thermodynamics-data", "tungsten-plate", 1) - util.add_product("se-hot-thermodynamics-data", {name="tungsten-plate", amount=1, probability=0.50}) + if mods.bzzirconium then + util.add_ingredient("se-hot-thermodynamics-data", "zirconium-tungstate", 1) + util.add_product("se-hot-thermodynamics-data", {name="zirconium-tungstate", amount=1, probability=0.50}) + else + util.add_ingredient("se-hot-thermodynamics-data", "tungsten-plate", 1) + util.add_product("se-hot-thermodynamics-data", {name="tungsten-plate", amount=1, probability=0.50}) + end util.add_ingredient("se-particle-beam-shielding-data", "tungsten-plate", 1) util.add_product("se-particle-beam-shielding-data", {name="tungsten-plate", amount=1, probability=0.20}) diff --git a/tungsten-recipe.lua b/tungsten-recipe.lua index 47d6954..add7e49 100644 --- a/tungsten-recipe.lua +++ b/tungsten-recipe.lua @@ -1,4 +1,4 @@ --- Lead smelting +-- Tungsten smelting local util = require("__bztungsten__.tungsten-util"); @@ -155,6 +155,12 @@ data:extend({ }, }) +local nozzle_i = {{"tungsten-plate", 2}} + +if mods.bzzirconium then + table.insert(nozzle_i, {"zirconium-plate", 1}) +end + data:extend({ { type = "item", @@ -174,20 +180,11 @@ data:extend({ icons = { { icon = "__bztungsten__/graphics/icons/rocket-engine-nozzle.png", icon_size = 128} }, - normal = - { - enabled = false, - energy_required = 5, - ingredients = {{"tungsten-plate", 2}}, - result = "rocket-engine-nozzle", - }, - expensive = - { - enabled = false, - energy_required = 5, - ingredients = {{"tungsten-plate", 3}}, - result = "rocket-engine-nozzle", - } + enabled = false, + energy_required = 5 * #nozzle_i, + ingredients = nozzle_i, + result = "rocket-engine-nozzle", + result_count = #nozzle_i } })