From e5cbac480edb9da674e4cce8fdb9d421fe47c974 Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 6 Jan 2025 00:58:38 +0000 Subject: [PATCH] Display equipment as well, may want to move this into number display --- src/Dodge/Inventory/SelectionList.hs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/Dodge/Inventory/SelectionList.hs b/src/Dodge/Inventory/SelectionList.hs index 24b4d5601..6f379e00b 100644 --- a/src/Dodge/Inventory/SelectionList.hs +++ b/src/Dodge/Inventory/SelectionList.hs @@ -52,7 +52,7 @@ itemDisplay :: World -> Creature -> ComposedItem -> [String] itemDisplay w cr ci = f (basicItemDisplay itm) (itemNumberDisplay w cr ci) - `g` anyhotkey + `g` anyextra where itm = ci ^. _1 NInt itid = itm ^. itID @@ -60,9 +60,18 @@ itemDisplay w cr ci = f f xs _ = xs g (x:xs) (y:_) = (rightPad 15 ' ' x ++ y) : xs g xs _ = xs --- anyhotkey = [" [E]"] - anyhotkey = maybe [] ((:[]) . hotkeyToString) + anyextra = maybe [] ((:[])) (anyhotkey <> anyequippos) + anyhotkey = fmap hotkeyToString (w ^? cWorld . lWorld . imHotkeys . unNIntMap . ix itid) +-- anyhotkey = maybe [] ((:[]) . hotkeyToString) +-- (w ^? cWorld . lWorld . imHotkeys . unNIntMap . ix itid) + anyequippos = fmap + (rightPad 8 ' ' . (' ' :) . eqPosText) + (ci ^? _1 . itLocation . ilEquipSite . _Just) +-- anyequippos = maybe +-- [] +-- (rightPad 8 ' ' . (' ' :) . eqPosText) +-- (ci ^? _1 . itLocation . ilEquipSite . _Just) --itemDisplay :: World -> Creature -> ComposedItem -> [String] --itemDisplay w cr ci =