Fix bakelite prerequisite if foundry is present

This commit is contained in:
Simon Brodtmann 2025-10-22 23:03:34 +02:00
parent 159ca3b1c0
commit 858d7d4f20

View file

@ -1,10 +1,5 @@
local util = require("data-util"); local util = require("data-util");
b_prereq = {"basic-chemistry"}
if data.raw.technology["foundry"] then
table.insert(b_prereq, "foundry")
end
data:extend({ data:extend({
{ {
type = "item", type = "item",
@ -35,7 +30,7 @@ data:extend({
name = "bakelite", name = "bakelite",
icon = "__bzgas2__/graphics/technology/bakelite.png", icon = "__bzgas2__/graphics/technology/bakelite.png",
icon_size = 256, icon_size = 256,
prerequisites = b_prereq, prerequisites = {"basic-chemistry"},
effects = { effects = {
{type = "unlock-recipe", recipe = "bakelite"}, {type = "unlock-recipe", recipe = "bakelite"},
}, },