Allow for partial reloading
This commit is contained in:
+15
-7
@@ -314,11 +314,11 @@ _itUseAimStance = _aimStance . _useAim . _itUse
|
||||
data ItemConsumption
|
||||
= LoadableAmmo
|
||||
{ _aoType :: AmmoType
|
||||
, _wpMaxAmmo :: Int
|
||||
, _wpLoadedAmmo :: Int
|
||||
, _wpReloadTime :: Int
|
||||
, _wpReloadState :: Int
|
||||
, _wpReloadType :: ReloadType
|
||||
, _ammoMax :: Int
|
||||
, _ammoLoaded :: Int
|
||||
, _reloadTime :: Int
|
||||
, _reloadState :: Maybe' Int
|
||||
, _reloadType :: ReloadType
|
||||
}
|
||||
| ChargeableAmmo
|
||||
{ _wpMaxCharge :: Int
|
||||
@@ -424,7 +424,10 @@ data ItemDimension = ItemDimension
|
||||
, _muzzleLength :: Float
|
||||
}
|
||||
|
||||
data ReloadType = ActiveReload | PassiveReload SoundID
|
||||
data ReloadType
|
||||
= ActiveReload
|
||||
| PartialActive Int
|
||||
| PassiveReload SoundID
|
||||
|
||||
-- I believe this is called every frame, not sure when though
|
||||
data ItEffect
|
||||
@@ -721,7 +724,11 @@ data WallStructure
|
||||
, _wlStDamCreature :: DamageType -> Wall -> Int -> World -> World
|
||||
}
|
||||
-- | Strict maybe
|
||||
data Maybe' a = Just' a | Nothing'
|
||||
data Maybe' a = Just' {__Just' :: a} | Nothing'
|
||||
deriving (Eq,Ord,Show)
|
||||
strictify :: Maybe a -> Maybe' a
|
||||
strictify Nothing = Nothing'
|
||||
strictify (Just x) = Just' x
|
||||
|
||||
data ActionPlan
|
||||
= Inanimate
|
||||
@@ -921,3 +928,4 @@ makeLenses ''Universe
|
||||
makeLenses ''LSParam
|
||||
makeLenses ''ItemParams
|
||||
makeLenses ''ItemTweaks
|
||||
makeLenses ''Maybe'
|
||||
|
||||
Reference in New Issue
Block a user