Refactor projectiles, fix shell drawing

This commit is contained in:
2024-12-27 23:27:53 +00:00
parent 233fe5995c
commit ed5c5d7b8a
7 changed files with 35 additions and 63 deletions
@@ -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