Fix crash when bzsilicon is present but bzaluminum is not

This commit is contained in:
Simon Brodtmann 2025-10-16 00:31:34 +02:00
parent 55a2bd5174
commit 74c3b6868b

View file

@ -866,7 +866,10 @@ if mods["bzsilicon"] then
energy_required = 10, energy_required = 10,
ingredients = {{type="item", name="sodium-aluminate", amount=10}, { type = "fluid", name = "water", amount = 100 }}, ingredients = {{type="item", name="sodium-aluminate", amount=10}, { type = "fluid", name = "water", amount = 100 }},
results = {{type="item", name="silica", amount=10}, {type="item", name="sodium-aluminate", amount=9}, { type = "fluid", name = "water", amount = 90 }} results = {{type="item", name="silica", amount=10}, {type="item", name="sodium-aluminate", amount=9}, { type = "fluid", name = "water", amount = 90 }}
}, }
})
if data.raw.item["aluminum-plate"] then
data:extend({
{ {
type = "recipe", type = "recipe",
name = "advanced-silicon-processing", name = "advanced-silicon-processing",
@ -885,8 +888,9 @@ if mods["bzsilicon"] then
energy_required = 10, energy_required = 10,
ingredients = {{type="item", name="silica", amount=9}, {type = "item", name = "aluminum-plate", amount=12}}, ingredients = {{type="item", name="silica", amount=9}, {type = "item", name = "aluminum-plate", amount=12}},
results = {{type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=9}, {type = "item", name = "alumina", amount=6}} results = {{type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=9}, {type = "item", name = "alumina", amount=6}}
}, }
}) })
end
if mods["bzgas"] then if mods["bzgas"] then
data:extend({ data:extend({
{ {