[0.15.34] stuck recipe when results[i].amount > stack_size
Posted: Wed Sep 20, 2017 9:59 am
While writing a mod to give settings for stack sizes for various items I noticed some broken fix with recipe.results.
If recipe result amount > item.stack_size factorio correctly splits the result into multiple results by itself which is great, but it doesn't update the amount of each result resulting in a machine getting stuck after the first recipe is completed.
Example:
will result in
Edit:
The confusing part about this is the recipe in game will show 2x 50 stacks of stone even if stone has a stack size of e.g. 60.
If recipe result amount > item.stack_size factorio correctly splits the result into multiple results by itself which is great, but it doesn't update the amount of each result resulting in a machine getting stuck after the first recipe is completed.
Example:
Code: Select all
recipe.results =
{
{ type = "item", name = stone, amount = 100 }
}
Code: Select all
recipe.results =
{
{ type = "item", name = stone, amount = 100 },
{ type = "item", name = stone, amount = 100 }
}
The confusing part about this is the recipe in game will show 2x 50 stacks of stone even if stone has a stack size of e.g. 60.