Protect update_stack against non-items (specifically fluids); and
Fixed update_stack "per-time-size" to round to whole number
When the recipe.energy was high enough, it could make the result from update_stack < 1.0. This would have the effect of adding the item to the logistics but with no count (a count of 0, effectively). The main point of this change is to address that.
The other change in update_stack ensures that the stack is an item_prototype. I had a paste crash when it tried pasting a fluid. This might be a result of my own personal change that adds a setting which allows the user to decide on the behavior of pasting to a buffer chest (a00cd38), but I thought it a good guard regardless for the mainline.
When the
recipe.energy
was high enough, it could make the result fromupdate_stack
< 1.0. This would have the effect of adding the item to the logistics but with no count (a count of 0, effectively). The main point of this change is to address that.The other change in
update_stack
ensures that the stack is anitem_prototype
. I had a paste crash when it tried pasting a fluid. This might be a result of my own personal change that adds a setting which allows the user to decide on the behavior of pasting to a buffer chest (a00cd38), but I thought it a good guard regardless for the mainline.