Refactor projectiles, fix shell drawing
This commit is contained in:
@@ -17,16 +17,9 @@ import Data.Aeson.TH
|
||||
import Dodge.Data.Bullet
|
||||
import Dodge.Data.Payload
|
||||
|
||||
data ProjectileHoming
|
||||
= NoHoming
|
||||
| HomeUsingRemoteScreen {_phRemoteID :: NewInt ItmInt}
|
||||
| HomeUsingTargeting {_phTargetingID :: NewInt ItmInt}
|
||||
deriving (Show, Eq, Ord, Read) --Generic, Flat)
|
||||
|
||||
data ProjectileUpdate
|
||||
= ThrustPU {_pjuStart :: Int, _pjuEnd :: Int, _pjuSmokeless :: Bool}
|
||||
| StartSpinPU {_pjuTime :: Int, _pjuCID :: Int, _pjuSpinAmound :: Int}
|
||||
-- | RemoteDirectionPU {_pjuStart :: Int, _pjuEnd :: Int, _pjuControllerID :: ProjectileHoming}
|
||||
| RemoteDirectionPU {_pjuStart :: Int, _pjuEnd :: Int}
|
||||
| ReduceSpinPU {_pjuReduceSpin :: Float}
|
||||
| DestroyPU {_pjuScreenID :: Maybe (NewInt ItmInt)
|
||||
@@ -61,9 +54,7 @@ data GasCreate = CreatePoisonGas | CreateFlame
|
||||
|
||||
makeLenses ''ProjectileUpdate
|
||||
makeLenses ''AmmoType
|
||||
makeLenses ''ProjectileHoming
|
||||
deriveJSON defaultOptions ''GasFuel
|
||||
deriveJSON defaultOptions ''ProjectileHoming
|
||||
deriveJSON defaultOptions ''ProjectileUpdate
|
||||
deriveJSON defaultOptions ''GasCreate
|
||||
deriveJSON defaultOptions ''ForceFieldType
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
module Dodge.Data.Projectile where
|
||||
|
||||
import Dodge.Data.Item.Location
|
||||
import NewInt
|
||||
import Control.Lens
|
||||
import Data.Aeson
|
||||
import Data.Aeson.TH
|
||||
@@ -13,7 +15,7 @@ import Geometry.Data
|
||||
|
||||
data ProjectileType
|
||||
= Grenade
|
||||
| Rocket {_rocketHoming :: ProjectileHoming}
|
||||
| Rocket {_rkHoming :: RocketHoming}
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data Projectile
|
||||
@@ -32,7 +34,16 @@ data Projectile
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read) --Generic, Flat)
|
||||
|
||||
data RocketHoming
|
||||
= NoHoming
|
||||
| HomeUsingRemoteScreen {_phRemoteID :: NewInt ItmInt}
|
||||
| HomeUsingTargeting {_phTargetingID :: NewInt ItmInt}
|
||||
deriving (Show, Eq, Ord, Read) --Generic, Flat)
|
||||
|
||||
|
||||
makeLenses ''Projectile
|
||||
makeLenses ''ProjectileType
|
||||
makeLenses ''RocketHoming
|
||||
deriveJSON defaultOptions ''RocketHoming
|
||||
deriveJSON defaultOptions ''ProjectileType
|
||||
deriveJSON defaultOptions ''Projectile
|
||||
|
||||
Reference in New Issue
Block a user