Make hotkeys assignable to any item, use item id

This commit is contained in:
2024-12-31 09:20:53 +00:00
parent 1e7dcbfded
commit e12e4777b2
8 changed files with 37 additions and 59 deletions
+2 -1
View File
@@ -32,7 +32,8 @@ invSelectionItem indent lw i ci =
}
where
cr = lw ^?! creatures . ix 0
anyhotkey = maybe [] ((' ' :) . hotkeyToString) (lw ^? imHotkeys . ix i)
itid = ci ^. _1 . itID . unNInt
anyhotkey = maybe [] ((' ' :) . hotkeyToString) (lw ^? imHotkeys . unNIntMap . ix itid)
anyequippos = maybe [] (rightPad 8 ' ' . (' ' :) . eqPosText)
(ci ^? _1 . itLocation . ilEquipSite . _Just)
col = itemInvColor ci