This commit is contained in:
Brevven 2022-08-13 00:42:20 -07:00
parent 2e2ecfe4dc
commit 3589dfb346

View file

@ -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)