I noticed something which might not be considered a bug, but I find it to be inconsistent and unexpected behavior. It concerns the ability of mods to change the inventory of the character. This can be done in the data stage using 'data.raw["character"]["character"].inventory_size', or in the control stage using 'player.character_inventory_slots_bonus'.
Now, to reproduce the 'bug' using the data stage method, you have to set a filter (for any item you have) in the last itemslot of your inventory. Then, you save, change the inventory_size to an amount that's smaller than it was before, restart the game, and load your save. What you will notice is that the item that was pinned at the end is gone from your inventory (it is not on the ground). When changing the inventory_size back to the previous size after a save, the filter will show up again, but the items stay gone.
When using the control stage method however, the items get put into the available slots in your inventory, like they would if you took off your armor. (although the inventory does not get re-sorted if you change it this way, you have to manually trigger a re-sort. It would be nicer if the inventory re-sorted if it's size changed.)
So I propose that changing the inventory size in the data stage should have the same consequences as changing it in the control stage, so you don't lose any items unexpectedly.
(I attached the log file and my save, but I doubt they will be of much help, the 'bug' is easily reproducible anyway. They are from an earlier version of Factorio, but I confirmed the behavior still happens on 0.17.41)
[0.17.41] Programmatically reducing the inventory size causes item removal
[0.17.41] Programmatically reducing the inventory size causes item removal
- Attachments
-
- factorio-current.log
- (5.04 KiB) Downloaded 61 times
-
- A.zip
- (1.6 MiB) Downloaded 61 times
Re: [0.17.41] Programmatically reducing the inventory size causes item removal
Thanks for the report however that's working as intended. It's an intended simplification to avoid code complication related to migrations.
If you want to get ahold of me I'm almost always on Discord.