Move held item scrolling into dedicated datatype

This commit is contained in:
2022-07-20 15:17:56 +01:00
parent 2755a4ffdd
commit 2c6e5e818a
10 changed files with 79 additions and 58 deletions
+27
View File
@@ -2,3 +2,30 @@
{-# LANGUAGE StrictData #-}
module Dodge.Data.Item.Consumption where
import Control.Lens
import Dodge.Data.Ammo
import Dodge.Data.LoadAction
import Dodge.Data.ItemAmount
data ItemConsumption
= LoadableAmmo
{ _laAmmoType :: AmmoType
, _laMax :: Int
, _laLoaded :: Int
, _laPrimed :: Bool
, _laCycle :: [LoadAction]
, _laProgress :: Maybe [LoadAction]
}
| AutoRecharging
{ _arLoaded :: Int
, _arMax :: Int
, _arTime :: Int
, _arProgress :: Int
}
| ChargeableAmmo
{ _wpMaxCharge :: Int
, _wpCharge :: Int
}
| ItemItselfConsumable
{ _icAmount :: IcAmount
}
| NoConsumption
makeLenses ''ItemConsumption
+4
View File
@@ -0,0 +1,4 @@
--{-# LANGUAGE StrictData #-}
module Dodge.Data.Item.HeldScroll where
data HeldScroll = HeldScrollDoNothing | HeldScrollZoom | HeldScrollCharMode