Rethink item ammo to item consumables, start item type datatype
This commit is contained in:
@@ -15,11 +15,12 @@ basicWeaponDisplay :: Item -> String
|
||||
basicWeaponDisplay it = midPadL 10 ' ' thename (' ' : thenumber) ++ theparam
|
||||
where
|
||||
thename = _itName it
|
||||
thenumber = case it ^? wpAmmo of
|
||||
thenumber = case it ^? itConsumption of
|
||||
Just am@LoadableAmmo{} -> case _wpReloadState am of
|
||||
0 -> show $ _wpLoadedAmmo am
|
||||
x -> "R" ++ show x
|
||||
Just am@ChargeableAmmo{} -> show $ _wpCharge am
|
||||
Just x@ItemItselfConsumable{} -> show $ _itMaxStack' x
|
||||
Nothing -> ""
|
||||
theparam = fromMaybe []
|
||||
. listToMaybe
|
||||
|
||||
Reference in New Issue
Block a user