Cleanup
This commit is contained in:
@@ -44,7 +44,8 @@ defaultItem = Item
|
||||
basicItemDisplay :: Item -> [String]
|
||||
basicItemDisplay it = Prelude.take (itSlotsTaken it) $
|
||||
(midPadL 15 ' ' thename (' ' : thenumber) ++ theparam)
|
||||
: moduleStrings it ++ repeat "*"
|
||||
: catMaybes [maybeWarmupStatus it]
|
||||
++ moduleStrings it ++ repeat "*"
|
||||
where
|
||||
thename = show . _iyBase $ _itType it
|
||||
thenumber = case it ^? itConsumption of
|
||||
@@ -79,9 +80,9 @@ maybeWarmupStatus :: Item -> Maybe String
|
||||
maybeWarmupStatus it = case it ^? itUse . useDelay . warmMax of
|
||||
Nothing -> Nothing
|
||||
Just m -> case m - (_warmTime . _useDelay $ _itUse it) of
|
||||
x | x <= 1 -> Just "WARM"
|
||||
x | x <= 1 -> Just "*WARM"
|
||||
| otherwise -> let n = show x
|
||||
in Just $ Prelude.take (4 - Prelude.length n) "WARM" ++ n
|
||||
in Just $ Prelude.take (5 - Prelude.length n) "*WARM" ++ n
|
||||
|
||||
defaultItemType :: ItemType
|
||||
defaultItemType = ItemType NOTDEFINED mempty
|
||||
|
||||
Reference in New Issue
Block a user