Unexpected UI when an active tool with UI is unloaded, runs out of charge, or when the player tries to sleep with the tool on #21093
Labels
<Bug>
This needs to be fixed
Info / User Interface
Game - player communication, menus, etc.
(S2 - Confirmed)
Bug that's been confirmed to exist
Related to #18033. There are these lines of code from
game::unload( item &it )
The code tries to deactivate a tool by activating it. If the tool shows UI when activated, unexpected UI will show when the the tool is active, and is then unloaded, runs out of charge, or if the player tries to sleep with the tool on.
The last scenario is fixable by not showing the UI unless it's the player who is activating the item (see #21014). For the first two, that fix is not applicable. It can be worked around by not showing the UI unless the tool has remaining charge, but it will not work for items that have multiple functions both when charged and not charged (Is there any item of this kind?).
Affected tools:
The text was updated successfully, but these errors were encountered: