Linting, refactor random angle walk for flamer
This commit is contained in:
@@ -13,23 +13,15 @@ import Control.Monad
|
||||
|
||||
-- not sure if this is in the right place...
|
||||
|
||||
{- |
|
||||
Displays the item name, ammo if loaded, and any selected '_itCharMode'.
|
||||
-}
|
||||
basicWeaponDisplay :: Item -> String
|
||||
basicWeaponDisplay it = case it ^? itAttachment . _Just . itCharMode of
|
||||
Just (c :<| _) -> midPadL 10 ' ' (_itName it) (' ' : aIfLoaded) ++ [' ',c]
|
||||
_ -> midPadL 10 ' ' (_itName it) (' ' : aIfLoaded)
|
||||
where
|
||||
availableAmmo = show $ _wpMaxAmmo it
|
||||
aIfLoaded = case (_wpReloadState it) of
|
||||
aIfLoaded = case _wpReloadState it of
|
||||
0 -> show $ _wpLoadedAmmo it
|
||||
x -> "R" ++ show x
|
||||
|
||||
displayLasGun :: Item -> String
|
||||
displayLasGun it@(Weapon {_itAttachment = mayPhase})
|
||||
= midPadL 10 ' ' "LASER" (' ':aIfLoaded) ++ (' ':phaseS)
|
||||
where aIfLoaded = case (_wpReloadState it) of
|
||||
0 -> show $ _wpLoadedAmmo it
|
||||
x -> "R" ++ show x
|
||||
phaseS = case mayPhase of
|
||||
Just (ItPhaseV 0.2) -> "V"
|
||||
Just (ItPhaseV 1) -> "/"
|
||||
Just (ItPhaseV 5) -> "Z"
|
||||
|
||||
Reference in New Issue
Block a user