Tweak inventory management
This commit is contained in:
@@ -3,6 +3,7 @@ Display of weapon strings in the inventory.
|
||||
-}
|
||||
module Dodge.Item.Weapon.InventoryDisplay
|
||||
( basicWeaponDisplay
|
||||
, maybeWarmupStatus
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Padding
|
||||
@@ -26,7 +27,7 @@ basicWeaponDisplay it = [midPadL 10 ' ' thename (' ' : thenumber) ++ theparam]
|
||||
. listToMaybe
|
||||
$ mapMaybe ($ it)
|
||||
[ maybeModeStatus
|
||||
, maybeWarmupStatus
|
||||
-- , maybeWarmupStatus
|
||||
, maybeRateStatus
|
||||
]
|
||||
|
||||
@@ -45,6 +46,6 @@ 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 (4 - Prelude.length n) "WARM" ++ n
|
||||
|
||||
Reference in New Issue
Block a user