Originally I was just going to add a special marker to the hotkey icon for unwielded items, but then Steven Aus requested a way to have the icon be removed altogether, so I expanded the addon's purview a bit. Now we add a game option "UI | Hotkey handling on unwield", with values "Default", "Mark" or "Remove".
Now, I haven't exhaustively tested this addon, just made sure it works with my usual option settings; in particular, I'm not sure how it interacts with the "Always add objects to hotkeys" option (which I turned off). So I'm putting this out for further testing before likely eventual merging into ZOmnibus.
[edit 2017-07-15: Technical info]
Code: Select all
Hooks: ToME:run [to surgically modify the hotkeys toolbar for our needs] ToME:runDone [to apply our settings on game load] GameOptions:generateList [to add our game options] Superload: mod.class.Player: onWear() [to update hotkey marks] onTakeoff() [to update hotkey marks] onRemoveObject() [to update hotkey marks]