[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
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.
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.