Fold some ammo data into its own type

This commit is contained in:
2021-11-27 13:40:56 +00:00
parent bfdac2fad5
commit 92a8dd59b8
21 changed files with 175 additions and 115 deletions
+6 -6
View File
@@ -294,15 +294,15 @@ data ItemUse
| LeftUse { _lUse :: Creature -> Int -> World -> World }
| NoUse
data ItemAmmo
= LoadbleAmmo
= LoadableAmmo
{ _aoType :: AmmoType
}
data Item
= Weapon
{ _itName :: String
, _wpMaxAmmo :: Int
, _wpLoadedAmmo :: Int
, _wpAmmo :: AmmoType
}
data Item
= Weapon
{ _itName :: String
, _wpAmmo :: ItemAmmo
, _wpReloadTime :: Int
, _wpReloadState :: Int
, _wpReloadType :: ReloadType