[0.15.10] overflow contents in small space hangs indefinite
Posted: Mon May 15, 2017 6:30 pm
Overflowing/spilling contents (i.e. when player inventory overflows onto the map) will indefinitely hang the game if there is no more room on the map for those contents to overflow onto. This applies to small custom maps and Factorissimo buildings. I realize the game goes to great lengths to never inadvertently destroy items, but in this case, that would be preferable to hanging the game indefinitely. Since destroying the items is probably the only way to fix this, perhaps a console message along with the 'inventory full' message informing the player that their overflow event resulted in destroyed items would also be useful.
*edit* this also applies to spillover from direct replacing where the previous container size/contents were larger than the container replacing to (steel chest to wooden chest, etc).
*edit 2* actually, would it be possible to simply prevent such direct replace events by checking that the capacity of the placed item is large enough to hold the contents of the currently placed storage item? That would help prevent the larger part of the issue in a way that makes more sense since the player would generally not intentionally cause a large spill into their own inventory / onto the map.
*edit* this also applies to spillover from direct replacing where the previous container size/contents were larger than the container replacing to (steel chest to wooden chest, etc).
*edit 2* actually, would it be possible to simply prevent such direct replace events by checking that the capacity of the placed item is large enough to hold the contents of the currently placed storage item? That would help prevent the larger part of the issue in a way that makes more sense since the player would generally not intentionally cause a large spill into their own inventory / onto the map.