Page 1 of 1

[boskid][2.0.37] setting Labs trash_inventory_size deletes the trash inventory

Posted: Sun Mar 02, 2025 11:30 am
by Puke
Hello there !
It's me again, your friendly inventories bug finder :D

First, I thank you for fixing the trash inventory size setup for assembling machines : I tested it and it works fine.
However it seems to be broken for labs.

By default, the labs create a trash inventory when an item spoils inside the lab. This behavior can be seen here :
When no item has spoiled inside the lab :
03-02-2025, 12-31-23.png
03-02-2025, 12-31-23.png (144.99 KiB) Viewed 366 times
When an item has spoiled inside the lab :
03-02-2025, 12-27-29.png
03-02-2025, 12-27-29.png (225.12 KiB) Viewed 369 times
----------------------------

However, when I try to alter the prototype to set trash_inventory_size = 3
On the screenshot below, the item has spoiled into a placeholder item that spoils into itself.
The normal behavior of a lab, from what I've seen, is that the item spoils and the spoil_result goes in the "trash inventory".
However, when I put trash_inventory_size = 3, the item spoils "in place" and the spoil result stays in the same slot.
03-02-2025, 12-27-17.png
03-02-2025, 12-27-17.png (263.97 KiB) Viewed 369 times
Regards

Re: [boskid][2.0.37] setting Labs trash_inventory_size deletes the trash inventory

Posted: Sun Mar 02, 2025 12:14 pm
by boskid
Thanks for the report. Issue is now fixed for 2.0.38. Issue was that when trash inventory size is given, spoiling code no longer attempts to resize the trash inventory and because it was of size 0, spoiling failed to move items to trash inventory. Trash inventory was supposed to be resized when lab was created/loaded but it was not causing it to remain of size 0.

Re: [boskid][2.0.37] setting Labs trash_inventory_size deletes the trash inventory

Posted: Sun Mar 02, 2025 12:35 pm
by Puke
Nice ! Thanks !

By the way, that raises another question : is it normal that the vanilla behavior is that, if you don't set the trash_inventory_size, it won't grow above 1 slot ?