Commit before changing module system to Map
This commit is contained in:
@@ -5,6 +5,7 @@ module Dodge.Item.Weapon.InventoryDisplay
|
||||
( basicItemDisplay
|
||||
, maybeWarmupStatus
|
||||
, maybeRateStatus
|
||||
, moduleStrings
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Padding
|
||||
@@ -17,9 +18,8 @@ import Control.Lens
|
||||
basicItemDisplay :: Item -> [String]
|
||||
basicItemDisplay it = Prelude.take (itSlotsTaken it) $
|
||||
(midPadL 15 ' ' thename (' ' : thenumber) ++ theparam)
|
||||
: moduleStrings ++ repeat "*"
|
||||
: moduleStrings it ++ repeat "*"
|
||||
where
|
||||
moduleStrings = fromMaybe [] $ it ^? itModules . modHitEffect . modName
|
||||
thename = _itName it
|
||||
thenumber = case it ^? itConsumption of
|
||||
Just am@LoadableAmmo{} -> case _reloadState am of
|
||||
@@ -37,6 +37,11 @@ basicItemDisplay it = Prelude.take (itSlotsTaken it) $
|
||||
-- , maybeRateStatus
|
||||
]
|
||||
|
||||
moduleStrings :: Item -> [String]
|
||||
moduleStrings it = map (" " ++)
|
||||
$ (fromMaybe [] $ it ^? itModules . modHitEffect . modName)
|
||||
++ (fromMaybe [] $ it ^? itModules . modRifleMag . modName)
|
||||
|
||||
maybeModeStatus :: Item -> Maybe String
|
||||
maybeModeStatus it = case it ^? itAttachment of
|
||||
Just ItCharMode {_itCharMode = (c :<| _)} -> Just [' ',c]
|
||||
|
||||
Reference in New Issue
Block a user