From 7c40dd716f284e9875d5045397b668acf28373e6 Mon Sep 17 00:00:00 2001 From: Brevven Date: Sun, 14 Aug 2022 12:30:10 -0700 Subject: [PATCH] up --- data-util.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/data-util.lua b/data-util.lua index 619f607..648d1a9 100644 --- a/data-util.lua +++ b/data-util.lua @@ -43,6 +43,10 @@ if get_setting("bz-recipe-bypass") then end end +function util.is_foundry() + return mods.bzfoundry and not me.get_setting("bzfoundry-minimal") +end + function bypass(recipe_name) if me.bypass[recipe_name] then return true end @@ -294,7 +298,10 @@ end -- Only works for recipes with multiple products function util.add_product(recipe_name, product) if bypass(recipe_name) then return end - if data.raw.recipe[recipe_name] and (data.raw.item[product[1]] or data.raw.item[product.name]) then + if data.raw.recipe[recipe_name] and + (data.raw.item[product[1]] or data.raw.item[product.name] or + data.raw.fluid[product[1]] or data.raw.fluid[product.name] + ) then add_product(data.raw.recipe[recipe_name], product) add_product(data.raw.recipe[recipe_name].normal, product) add_product(data.raw.recipe[recipe_name].expensive, product) @@ -945,6 +952,7 @@ function util.replace_ingredients_prior_to(tech, old, new, multiplier) 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 + 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) util.replace_ingredient(recipe.name, old, new, multiplier, true)