Rethink item ammo to item consumables, start item type datatype

This commit is contained in:
2021-11-29 16:22:31 +00:00
parent 3a605b8156
commit f40d486d68
31 changed files with 238 additions and 193 deletions
+2 -1
View File
@@ -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