Closed jpsenior closed 2 years ago
I attempted to just comment out the corresponding code from the lua file...
--if hand_location and hand_location then
-- player.hand_location = { inventory = inventory_def, slot = hand_location }
--end
The crash is avoided -- and I don't lose the item either. Maybe it's not necessary to swap handheld items?
Thank you for the very detailed bug report!
Describe the Bug
In editor mode, one can create an item freely from the crafting window. The player inventory size is less than the available inventory size in editor mode. If the 'player' inventory capacity is full, and an item is on the cursor when exiting editor mode, a crash happens.
To Reproduce
Steps to reproduce the behavior:
Start a new fresh game.
Enter Editor mode.
Fill every possible player-inventory slot full of something - it doesn't matter what. The editor inventory is larger than the player inventory.
Craft an item and hold it in the cursor. The game can't push this item to the player inventory because it is full.
Exit editor mode. Crash happens immediately
Be certain to reproduce the issue on the same save file that you upload.
Save file & Username
I don't think a save file is important for this, it can be reproduced instantly on a fresh world.
Log file