Fold in more ammo parameters, distinguish loadable and charging weapons
This commit is contained in:
+17
-10
@@ -290,31 +290,38 @@ data ItemPos
|
||||
= InInv { _itCrId :: Int , _itInvId :: Int }
|
||||
| OnFloor { _itFlID :: Int }
|
||||
data ItemUse
|
||||
= RightUse { _rUse :: Item -> Creature -> World -> World }
|
||||
| LeftUse { _lUse :: Creature -> Int -> World -> World }
|
||||
= RightUse
|
||||
{ _rUse :: Item -> Creature -> World -> World
|
||||
}
|
||||
| LeftUse
|
||||
{ _lUse :: Creature -> Int -> World -> World
|
||||
}
|
||||
| NoUse
|
||||
data ItemAmmo
|
||||
= LoadableAmmo
|
||||
{ _aoType :: AmmoType
|
||||
, _wpMaxAmmo :: Int
|
||||
, _wpLoadedAmmo :: Int
|
||||
, _wpReloadTime :: Int
|
||||
, _wpReloadState :: Int
|
||||
, _wpReloadType :: ReloadType
|
||||
}
|
||||
| ChargeableAmmo
|
||||
{ _wpMaxCharge :: Int
|
||||
, _wpCharge :: Int
|
||||
}
|
||||
data Item
|
||||
= Weapon
|
||||
{ _itName :: String
|
||||
, _wpAmmo :: ItemAmmo
|
||||
, _wpReloadTime :: Int
|
||||
, _wpReloadState :: Int
|
||||
, _wpReloadType :: ReloadType
|
||||
, _wpMaxWarmUp :: Int
|
||||
, _wpCurWarmUp :: Int
|
||||
, _wpMaxCoolDown :: Int
|
||||
, _wpCurCoolDown :: Int
|
||||
, _wpMaxWarmUp :: Int
|
||||
, _wpCurWarmUp :: Int
|
||||
, _wpMaxCoolDown :: Int
|
||||
, _wpCurCoolDown :: Int
|
||||
, _itUseRate :: Int
|
||||
, _itUseTime :: Int
|
||||
, _itUse :: ItemUse
|
||||
, _itUseModifiers :: [(Item -> Creature -> World -> World) -> Item -> Creature -> World -> World]
|
||||
--, _itLeftClickUse :: Maybe (Creature -> Int -> World -> World)
|
||||
, _wpSpread :: Float
|
||||
, _wpRange :: Float
|
||||
, _itHammer :: HammerPosition
|
||||
|
||||
Reference in New Issue
Block a user