Linting, haddocking
This commit is contained in:
@@ -1,15 +1,26 @@
|
||||
{- |
|
||||
Display of weapon strings in the inventory.
|
||||
-}
|
||||
module Dodge.Item.Weapon.InventoryDisplay
|
||||
where
|
||||
import Dodge.Data
|
||||
import Dodge.Base
|
||||
import Dodge.Item.Attachment.Data
|
||||
|
||||
import Control.Lens
|
||||
import Control.Monad
|
||||
|
||||
-- MODES SHOULD BE MADE UNIFORM
|
||||
|
||||
basicWeaponDisplay :: Item -> String
|
||||
basicWeaponDisplay it = midPadL 10 ' ' (_itName it) (' ' : aIfLoaded)
|
||||
where
|
||||
availableAmmo = show $ _wpMaxAmmo it
|
||||
aIfLoaded = case (_wpReloadState it) of
|
||||
0 -> show $ _wpLoadedAmmo it
|
||||
x -> "R" ++ show x
|
||||
basicWeaponDisplay it = case it ^? itAttachment . _Just . itCharMode of
|
||||
Just c -> midPadL 10 ' ' (_itName it) (' ' : aIfLoaded) ++ [' ',c]
|
||||
otherwise -> midPadL 10 ' ' (_itName it) (' ' : aIfLoaded)
|
||||
where
|
||||
availableAmmo = show $ _wpMaxAmmo it
|
||||
aIfLoaded = case (_wpReloadState it) of
|
||||
0 -> show $ _wpLoadedAmmo it
|
||||
x -> "R" ++ show x
|
||||
|
||||
displayAutoGun :: Item -> String
|
||||
displayAutoGun it@(Weapon {_itAttachment = mayMode})
|
||||
|
||||
Reference in New Issue
Block a user