Continue refactor of reloading
This commit is contained in:
+15
-13
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user