Page 1 of 1

[1.1.80] find_empty_stack() used on player's inventory can return the (unwritable) slot reserved for the "hand" icon

Posted: Fri May 26, 2023 11:11 am
by KingIonTrueLove
While trying to find an empty stack in a player's inventory to manipulate, I would use find_empty_stack() in the hopes of getting an empty inventory slot that was valid for write.

but, if the player is holding something, this will very likely return the index of the "hand" icon. This should be practically guaranteed to happen if the players inventory autosorts.

this is an issue because the slot with the hand icon, while technically counting as 'empty' is quite unusable for any case when you would want an empty slot, as you can not write to it.

Re: [1.1.80] find_empty_stack() used on player's inventory can return the (unwritable) slot reserved for the "hand" icon

Posted: Sat Oct 07, 2023 4:52 pm
by Rseding91
Thanks for the report. This is now fixed for the next 1.1. release.