Continue refactor of reloading

This commit is contained in:
2022-06-20 11:12:24 +01:00
parent 2f4b381484
commit a85cf4d1fb
27 changed files with 243 additions and 299 deletions
+15 -13
View File
@@ -482,19 +482,12 @@ data Equipment = Equipment
_itUseAimStance :: Item -> AimStance
_itUseAimStance = _aimStance . _useAim . _itUse
data TransferState
= Transfer { _transferAmount :: Int , _transferTime :: Int}
| NoTransfer
deriving (Eq,Ord,Show)
data ItemConsumption
= LoadableAmmo
{ _laType :: AmmoType
{ _laAmmoType :: AmmoType
, _laMax :: Int
, _laLoaded :: Int
, _laReloadTime :: Int
, _laTransfer :: TransferState
, _laReloadType :: ReloadType
, _laLoadType :: LoadType
}
| ChargeableAmmo
{ _wpMaxCharge :: Int
@@ -552,9 +545,17 @@ data ItemPortage
| WornItem
| NoPortage
data ReloadType
= ActiveClear
| ActivePartial {_partialReloadAmount :: Int}
data LoadProgress
= NoTransfer
| Eject {_ejectProgress :: Int}
| Insert {_insertProgress :: Int, _insertAmount :: Int }
deriving (Eq,Ord,Show)
data LoadType
= ActiveEject
{_ejectTime :: Int, _insertTime :: Int,_loadProgress :: LoadProgress }
| ActivePartial
{_insertTime :: Int, _loadAmount :: Int, _loadProgress :: LoadProgress }
| PassiveReload SoundID
deriving Eq
@@ -1481,7 +1482,8 @@ makeLenses ''ItEffect
makeLenses ''FloorItem
makeLenses ''ItemConsumption
makeLenses ''AmmoType
makeLenses ''TransferState
makeLenses ''LoadType
makeLenses ''LoadProgress
makeLenses ''TweakParam
makeLenses ''Prop
makeLenses ''Modification