LuaSurface.spill_item_stack second return for items created on belts
Posted: Sat Sep 12, 2026 12:20 am
spill_item_stack returns an array of the item entities it creates on the ground. However, it can also create items on belts, and it gives no indication when it does so. An empty return could mean "not able to create any items" OR it could mean "Every created item landed on a belt".
I propose a second return value that is either the simple option of the number of items created on belts, or the more complex option that would be an array of some new data structure pairing LuaTransportLine with DetailedItemOnLine.
I propose a second return value that is either the simple option of the number of items created on belts, or the more complex option that would be an array of some new data structure pairing LuaTransportLine with DetailedItemOnLine.