This commit is contained in:
2025-01-07 00:39:59 +00:00
parent beaf65f3f7
commit 1e7611ab81
13 changed files with 76 additions and 60 deletions
+9 -1
View File
@@ -51,12 +51,20 @@ itemDisplay w cr ci = f
f xs _ = xs
g (x:xs) (y:_) = (rightPad 15 ' ' x ++ y) : xs
g xs _ = xs
anyextra = maybeToList (anyhotkey <> anyequippos)
anyextra = maybeToList (anyhotkey <> anyequippos <> anyscroll)
anyhotkey = fmap hotkeyToString
(w ^? cWorld . lWorld . imHotkeys . unNIntMap . ix itid)
anyequippos = fmap
(rightPad 8 ' ' . (' ' :) . eqPosText)
(ci ^? _1 . itLocation . ilEquipSite . _Just)
anyscroll = fmap absurround $ itemScrollDisplay =<< (ci ^? _1 . itScroll)
absurround str = '<' : str ++ ">"
itemScrollDisplay :: ItemScroll -> Maybe String
itemScrollDisplay = \case
NoItemScroll -> Nothing
ItemScrollInt i -> Just $ show i
ItemScrollIntRange _ i -> Just $ show i
itemDisplayPad :: [Char] -> String -> [Char]
itemDisplayPad ls rs