Separate out ammo data

This commit is contained in:
2022-07-20 15:01:01 +01:00
parent 8142899be1
commit 2755a4ffdd
14 changed files with 242 additions and 262 deletions
+33 -4
View File
@@ -1,9 +1,13 @@
--{-# LANGUAGE TemplateHaskell #-}
--{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.Ammo where
import Dodge.Data.Payload
import Dodge.Data.Bullet
import Dodge.Data.Gas
import Dodge.Data.Wall
import Control.Lens
data ProjectileDraw = DrawShell | DrawRemoteShell | DrawDrone | DrawBlankProjectile
data ProjectileCreate = CreateShell
data ProjectileCreate = CreateShell | CreateTrackingShell
data ProjectileUpdate
= PJThrust {_pjuStart :: Int, _pjuEnd :: Int}
| PJSpin {_pjuTime :: Int, _pjuCID :: Int, _pjuSpinAmound :: Int}
@@ -11,3 +15,28 @@ data ProjectileUpdate
| PJReduceSpin {_pjuReduceSpin :: Float}
| PJRemoteDirection {_pjuStart :: Int, _pjuEnd :: Int, _pjuCID :: Int, _pjuITID :: Int}
| PJSetScope {_pjuITID :: Int}
| PJRetireRemote {_pjuITID :: Int, _pjuTimer :: Int, _pjuPJID :: Int}
data AmmoType
= ProjectileAmmo
{ _amPayload :: Payload
, _amString :: String
, _amPjDraw :: ProjectileDraw
, _amPjCreation :: ProjectileCreate
}
| BulletAmmo
{ _amString :: String
, _amBullet :: Bullet
}
| DroneAmmo
{ _amString :: String }
| GasAmmo
{ _amString :: String
, _amCreateGas :: GasCreate
}
| ForceFieldAmmo
{ _amForceFieldType :: Wall
}
| GenericAmmo
makeLenses ''ProjectileUpdate
makeLenses ''AmmoType
+4
View File
@@ -0,0 +1,4 @@
--{-# LANGUAGE TemplateHaskell #-}
--{-# LANGUAGE StrictData #-}
module Dodge.Data.Gas where
data GasCreate = CreatePoisonGas | CreateFlame
+4
View File
@@ -0,0 +1,4 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.Item.Consumption where
import Control.Lens