I've been absent from the game and therefore from programming Lua for quite a period, and I've never been good with this language, so I'd like to know if you're kind enough to tell me if there's a way to do a thing like this.
(Maybe it's faster with an example.)
Code: Select all
{
type = "recipe",
name = "iron-ingot-v1",
category = "smelting",
energy_required = 3.2,
ingredients =
{
{ "iron-mineral", 1}
},
result ="iron-ingot"
}
Now i research this new recipe with the "steel-processing" technology:
Code: Select all
{
type = "recipe",
name = "iron-ingot-v2",
category = "smelting",
energy_required = 3.2,
enabled=false,
ingredients =
{
{ "iron-mineral", 1}
},
result ="iron-ingot",
result_count=2
}
(And, but maybe this is too much, if an assembling machine runs the first recipe - not this obv its category is smelting - is there a way to instantly change it to do the new recipe or will I have to do it manually in-game?)