The most logical ordering for me would be to prioritize items that are declared the most (for example, if the recipe needs 12 steel and 1 plastic, it'd make sense for the tooltip to display the steel first)
The solution to that, and to avoid any unwanted behavior, I suggest that recipes should keep the recipe/ingredient ordering of the prototype.
Another solution would be to allow for an "order" string in https://lua-api.factorio.com/latest/typ ... otype.html and https://lua-api.factorio.com/latest/typ ... otype.html
example:
Code: Select all
{
type = "recipe",
name = "silicon",
category = "chemistry",
energy_required = 2,
ingredients = {
{type = "item", name = "sand", amount = 5, order = "a"},
{type = "item", name = "coal", amount = 1, order = "b"},
{type = "fluid", name = "steam", amount = 10, order = "c"},
},
results = {
{type = "item", name = "silicon", amount = 1, order = "a"}
{type = "fluid", name = "water", amount = 1, order = "b"}
},
allow_productivity = true,
enabled = false,
},