Cleanup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user