[Solved]Recipe with enabled=false still available from start
Posted: Mon Feb 26, 2018 6:21 pm
Hi,
I modded a custom recipe and locked it behind a vanilla technology. The lua script looks like this:
As you can see in the recipe definition "enabled" is set to "false". In game, in the technology window, at the technology "plastics" the recipe shows up correctly as "effect" of the completed research. But still it is available from the start of the game.
How can I fix this?
I modded a custom recipe and locked it behind a vanilla technology. The lua script looks like this:
Code: Select all
data:extend{
{
type = "recipe",
name = "recipe-electronic-circuit-plastic-bar",
enabled = false,
normal =
{
ingredients =
{
{"plastic-bar", 1},
{"copper-cable", 3}
},
results={{type="item", name="electronic-circuit", amount=1}},
main_product= "",
},
expensive =
{
ingredients =
{
{"plastic-bar", 2},
{"copper-cable", 10}
},
results={{type="item", name="electronic-circuit", amount=1}},
main_product= "",
},
subgroup = "intermediate-product",
order = "electronic-circuit-9",
icon = "__Electronic_Circuit_Plastic_Bar__/graphics/icons/recipe/electronic-circuit-plastic-bar.png",
icon_size = 32,
}
}
table.insert(data.raw.technology["plastics"].effects, {type = "unlock-recipe", recipe = "recipe-electronic-circuit-plastic-bar"})
How can I fix this?