Continue weapon effect chain work

Start work on using muzzles to determine the effect of the ammo when
loaded
This commit is contained in:
2024-09-18 00:36:28 +01:00
parent 791003ebb9
commit 2c96a514ea
22 changed files with 502 additions and 404 deletions
+2
View File
@@ -5,6 +5,7 @@
module Dodge.Data.Item.HeldDelay where
import Sound.Data
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -24,6 +25,7 @@ data UseDelay -- should just be Delay
| WarmUpNoDelay
{ _warmTime :: Int
, _warmMax :: Int
, _warmSound :: SoundID
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
+4 -4
View File
@@ -14,7 +14,7 @@ import Control.Lens
data Huse
= HeldDoNothing
| HeldUseAmmoParams
-- | HeldUseAmmoParams
| HeldOverNozzlesUseGasParams
| HeldPJCreation
| HeldPJCreationX Int
@@ -94,9 +94,9 @@ data HeldMod
| PistolMod
-- | AutoPistolMod
-- | MachinePistolMod
| BurstRifleMod
| BurstRifleRepeatMod
| MiniGunMod Int
-- | BurstRifleMod
-- | BurstRifleRepeatMod
-- | MiniGunMod Int
-- | SmgMod
-- | BangConeMod
| TractorMod --apply with AmmoCheckMod
+20 -1
View File
@@ -75,6 +75,10 @@ data HeldParams
= DefaultHeldParams
| GasSprayParams
{_gasCreation :: GasCreate}
| BeamShooterParams
{ _bulGunSound :: (SoundID, Int) -- if the int is 0, play sound on new channel
-- TODO remove duplicate
}
| BulletShooterParams
{ _muzVel :: GenFloat
, _rifling :: GenFloat
@@ -82,7 +86,9 @@ data HeldParams
, _torqueAfter :: Float
, _randomOffset :: Float
, _sidePush :: Float
, _bulGunSound :: SoundID
, _bulGunSound :: (SoundID, Int) -- if the int is 0, play sound on new channel
-- if >0, continue playing sound for
-- given time
, _weaponInvLock :: Int
, _weaponRepeat :: [Int]
}
@@ -130,7 +136,18 @@ data AimParams = AimParams
data FlareType = DefaultFlareType
| PistolFlare
| MiniGunFlare
| HeavySmokeFlare
| LasGunFlare
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data MuzzleEffect
= MuzzleShootBullet
| MuzzleLaser
| MuzzleTesla
| MuzzleTractor
| MuzzleLauncher
| MuzzleFlame
| MuzzleGas
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Muzzle = Muzzle
@@ -139,6 +156,7 @@ data Muzzle = Muzzle
, _mzInaccuracy :: Float
, _mzAmmoSlot :: Int
, _mzFlareType :: FlareType
, _mzEffect :: MuzzleEffect
-- , _mzRecoil :: Float
-- , _mzTorque :: Float
-- , _mzSidePush :: Float
@@ -175,6 +193,7 @@ makeLenses ''HeldParams
makeLenses ''AttachParams
makeLenses ''ScrollAttachParams
makeLenses ''AmmoParams
deriveJSON defaultOptions ''MuzzleEffect
deriveJSON defaultOptions ''FlareType
deriveJSON defaultOptions ''TriggerType
deriveJSON defaultOptions ''AmmoParams
+1
View File
@@ -144,6 +144,7 @@ data LWorld = LWorld
, _distortions :: [Distortion]
, _lClock :: Int
, _lTestString :: [String]
, _lTestInt :: Int
}
data WorldBeams = WorldBeams
{ _blockingBeams :: [Beam]