Partial removal of reloading
This commit is contained in:
+19
-16
@@ -123,8 +123,8 @@ itemNumberDisplay cr itm = case iu of
|
||||
EquipUse{} -> showEquipmentNumber cr itm
|
||||
CraftUse x -> [show $ x ^. getItAmount]
|
||||
ConsumeUse {_useAmount = x} -> [show $ x ^. getItAmount]
|
||||
AttachUse {} -> [showReloadProgress cr itm]
|
||||
AmmoMagUse {} -> [showReloadProgress cr itm]
|
||||
AttachUse {} -> [] --[showReloadProgress cr itm]
|
||||
AmmoMagUse {} -> [showLoadedAmount itm]
|
||||
-- this could be cleaner here...
|
||||
where
|
||||
iu = itm ^?! itUse
|
||||
@@ -152,12 +152,15 @@ showEquipmentNumber _ itm = case _eeUse ee of
|
||||
-- )
|
||||
-- <|> Just [x]
|
||||
|
||||
showReloadProgress :: Creature -> Item -> String
|
||||
showReloadProgress _ itm = fromMaybe [] $ do
|
||||
ia <- itm ^? itUse . amagLoadStatus
|
||||
return $ case ia ^? iaProgress . _Just . ix 0 of
|
||||
Nothing -> maybe "" show $ ia ^? iaLoaded
|
||||
Just la -> showLoadActionType la ia
|
||||
showLoadedAmount :: Item -> String
|
||||
showLoadedAmount itm = fromMaybe [] $ fmap show $ itm ^? itUse . amagLoadStatus . iaLoaded
|
||||
|
||||
--showReloadProgress :: Creature -> Item -> String
|
||||
--showReloadProgress _ itm = fromMaybe [] $ do
|
||||
-- ia <- itm ^? itUse . amagLoadStatus
|
||||
-- return $ case ia ^? iaProgress . _Just . ix 0 of
|
||||
-- Nothing -> maybe "" show $ ia ^? iaLoaded
|
||||
-- Just la -> showLoadActionType la ia
|
||||
--showReloadProgress :: Creature -> Item -> String
|
||||
--showReloadProgress cr itm = case ic ^? laSource of
|
||||
-- Just (InternalSource ia) -> case ia ^? iaProgress . _Just . ix 0 of
|
||||
@@ -171,14 +174,14 @@ showReloadProgress _ itm = fromMaybe [] $ do
|
||||
-- where
|
||||
-- ic = itm ^?! itUse . heldConsumption
|
||||
|
||||
showLoadActionType :: LoadAction -> ReloadStatus -> String
|
||||
showLoadActionType la as = case la of
|
||||
LoadEject{} -> "E"
|
||||
LoadInsert{} -> "L"
|
||||
LoadAdd{} -> "A" ++ x
|
||||
LoadPrime{} -> "P"
|
||||
where
|
||||
x = maybe "" show $ as ^? iaLoaded
|
||||
--showLoadActionType :: LoadAction -> ReloadStatus -> String
|
||||
--showLoadActionType la as = case la of
|
||||
-- LoadEject{} -> "E"
|
||||
-- LoadInsert{} -> "L"
|
||||
-- LoadAdd{} -> "A" ++ x
|
||||
-- LoadPrime{} -> "P"
|
||||
-- where
|
||||
-- x = maybe "" show $ as ^? iaLoaded
|
||||
|
||||
maybeWarmupStatus :: Item -> Maybe String
|
||||
maybeWarmupStatus it = case it ^? itUse . heldDelay . warmMax of
|
||||
|
||||
Reference in New Issue
Block a user