What did you do?
To make my code simpler, I normalised the definitions of any recipes I'm about to process, for example:This is the original recipe:
Code: Select all
data:extend{
{
ingredients = {
{
"wood",
2
}
},
name = "wooden-chest",
result = "wooden-chest",
type = "recipe"
}
}
Code: Select all
data:extend{
{
ingredients = {
{
amount = 2,
name = "wood",
type = "item"
}
},
-- main_product = "wooden-chest",
name = "wooden-chest",
results = {
{
amount = 1,
name = "wooden-chest",
type = "item"
}
},
type = "recipe"
}
}
What happened?
Failed to generate prototype because icon not defined, despite icon only being mandatory if there is more than one result, and main_product is not specified.What did you expect to happen instead?
The documentation for main_product implies that it only needs to be supplied for the case where there is more than one entry in the results table, (and I suspect that the code that parses the recipe definition is happy), but the code that does icon lookup doesn't seem to cope with what should be a transformation that doesn't change the semantics of the recipe definition.For the moment, I've added a redundant main_product to the transformed recipe data.