Cleanup and fix selection section cursor position bug
This commit is contained in:
@@ -39,7 +39,7 @@ basicItemDisplay itm =
|
||||
itemBaseName itm :
|
||||
catMaybes [maybeWarmupStatus itm, maybeRateStatus itm]
|
||||
++ moduleStrings itm
|
||||
++ repeat "\\"
|
||||
++ repeat "*"
|
||||
|
||||
itemString :: Item -> String
|
||||
itemString = head . basicItemDisplay
|
||||
@@ -78,7 +78,7 @@ showAutoRechargeProgress lc = case lc of
|
||||
|
||||
itemNumberDisplay :: Creature -> Item -> [String]
|
||||
itemNumberDisplay cr itm = case iu of
|
||||
HeldUse{} -> [showReloadProgress' cr itm]
|
||||
HeldUse{} -> [showReloadProgress cr itm]
|
||||
LeftUse{} -> [showAutoRechargeProgress (_leftConsumption iu)]
|
||||
EquipUse{} -> showEquipmentNumber cr itm
|
||||
_ -> [show $ iu ^?! useAmount . getItAmount]
|
||||
@@ -106,17 +106,14 @@ showAmmoSource cr itm = fromMaybe ["FAIL"] $ do
|
||||
guard (at' == atype && as == AboveSource)
|
||||
return ["vvvv",x] ) <|> Just [x]
|
||||
|
||||
showReloadProgress' :: Creature -> Item -> String
|
||||
showReloadProgress' cr itm = case ic ^? laSource of
|
||||
showReloadProgress :: Creature -> Item -> String
|
||||
showReloadProgress cr itm = case ic ^? laSource of
|
||||
Just (InternalSource ia) -> case ia ^? iaProgress . _Just . ix 0 of
|
||||
Nothing -> fromMaybe "" $ do
|
||||
x <- ic ^? laSource . _InternalSource . iaLoaded
|
||||
return $ show x
|
||||
Just la -> show (_actionTime la) ++ showLoadActionType la (_laSource ic)
|
||||
Nothing -> maybe "" show $ ic ^? laSource . _InternalSource . iaLoaded
|
||||
Just la -> showLoadActionType la (_laSource ic)
|
||||
Just AboveSource -> fromMaybe "||||" $ do
|
||||
i <- fmap (subtract 1) $ itm ^? itLocation . ipInvID
|
||||
_ <- cr ^? crInv . ix i . itUse . equipEffect . eeUse . euseAmmoAmount
|
||||
--return $ showIntKMG' x
|
||||
return ""
|
||||
_ -> ""
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user