This commit is contained in:
2024-12-18 15:50:22 +00:00
parent 694bc2b060
commit 86d884ba01
12 changed files with 11 additions and 52 deletions
+1 -14
View File
@@ -79,20 +79,6 @@ showAutoRechargeProgress lc = case lc of
| otherwise -> show (_arLoaded lc)
ChargeableAmmo{} -> show (_wpCharge lc)
--showReloadProgress :: Creature -> Item -> String
--showReloadProgress cr itm = case cr ^? crManipulation . manObject . inInventory . iselAction of
-- Just (ReloadAction i la) -> show i ++ showLoadActionType la ic
-- _ -> case ic of
-- InternalSource ia -> case ia ^? iaProgress . _Just . ix 0 of
-- Nothing -> show $ ia ^. iaLoaded
-- Just la -> show (_actionTime la) ++ showLoadActionType la ic
-- AboveSource -> fromMaybe "XXXX" $ do
-- i <- fmap (subtract 1) $ itm ^? itLocation . ipInvID
-- x <- cr ^? crInv . ix i . itUse . equipEffect . eeUse . euseAmmoAmount
-- return $ showIntKMG' x
-- where
-- ic = (itm ^?! itUse . heldConsumption . laSource)
itemNumberDisplay :: Creature -> ComposedItem -> [String]
itemNumberDisplay cr ci = case (ci ^. _2, itm ^?! itUse, itm ^. itType) of
(_,_,EQUIP WRIST_ECG) -> [displayPulse $ cr ^?! crType . avatarPulse . pulseProgress]
@@ -112,6 +98,7 @@ itemNumberDisplay cr ci = case (ci ^. _2, itm ^?! itUse, itm ^. itType) of
itm = ci ^. _1
displayPulse :: Int -> String
displayPulse 0 = "*****"
displayPulse x = take 5 $ drop y "----^-----"
where
y = min 5 $ x `div` 3