Tweaks concerning item types
This commit is contained in:
+18
-12
@@ -94,22 +94,28 @@ showAutoRechargeProgress lc = case lc of
|
||||
-- ic = (itm ^?! itUse . heldConsumption . laSource)
|
||||
|
||||
itemNumberDisplay :: Creature -> ComposedItem -> [String]
|
||||
itemNumberDisplay cr ci = case (ci ^. _2, itm ^?! itUse) of
|
||||
(WeaponTargetingSF,_)
|
||||
itemNumberDisplay cr ci = case (ci ^. _2, itm ^?! itUse, itm ^. itType) of
|
||||
(_,_,EQUIP WRIST_ECG) -> [displayPulse $ cr ^?! crType . avatarPulse . pulseProgress]
|
||||
(WeaponTargetingSF,_,_)
|
||||
-> [maybe "" (const "!TARG!") (itm ^? itTargeting . itTgPos . _Just)]
|
||||
(_,UseHeld{}) -> []
|
||||
(_,UseHotkey{_leftConsumption=lc}) -> [showAutoRechargeProgress lc]
|
||||
(_,UseEquip{}) -> showEquipmentNumber cr itm
|
||||
(_,UseCraft) -> []
|
||||
(_,UseConsume {}) -> []
|
||||
(_,UseAttach (APInt i)) -> [show i]
|
||||
(_,UseAttach {}) -> []
|
||||
(_,UseAmmoMag {}) -> [maybe "" shortShow $ itm ^? itUse . amagLoadStatus . iaLoaded]
|
||||
(_,UseScope OpticScope {_opticZoom = x}) -> [shortShow x]
|
||||
(_,UseBulletMod {}) -> mempty
|
||||
(_,UseHeld{},_) -> []
|
||||
(_,UseHotkey{_leftConsumption=lc},_) -> [showAutoRechargeProgress lc]
|
||||
(_,UseEquip{},_) -> showEquipmentNumber cr itm
|
||||
(_,UseCraft,_) -> []
|
||||
(_,UseConsume {},_) -> []
|
||||
(_,UseAttach (APInt i),_) -> [show i]
|
||||
(_,UseAttach {},_) -> []
|
||||
(_,UseAmmoMag {},_) -> [maybe "" shortShow $ itm ^? itUse . amagLoadStatus . iaLoaded]
|
||||
(_,UseScope OpticScope {_opticZoom = x},_) -> [shortShow x]
|
||||
(_,UseBulletMod {},_) -> mempty
|
||||
where
|
||||
itm = ci ^. _1
|
||||
|
||||
displayPulse :: Int -> String
|
||||
displayPulse x = take 5 $ drop y "----^-----"
|
||||
where
|
||||
y = min 5 $ x `div` 3
|
||||
|
||||
showEquipmentNumber :: Creature -> Item -> [String]
|
||||
showEquipmentNumber _ itm = case _eeUse ee of
|
||||
EFuelSource x _ -> [show x]
|
||||
|
||||
Reference in New Issue
Block a user