Implement remote screen for launcher projectiles

This commit is contained in:
2024-09-27 10:39:21 +01:00
parent fb6fcff61c
commit 5f9fb183a9
35 changed files with 238 additions and 170 deletions
+12 -4
View File
@@ -9,11 +9,17 @@ import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
data CamControl
= CamInGame
| CamFloat
data CamInGameType
= CamOnPlayer
| CamOpticScope
| CamRemoteScope
deriving (Eq,Show,Read,Enum,Bounded)
data CamControl
= CamInGame { _cigType :: CamInGameType}
| CamFloat
deriving (Eq,Show,Read)
data Camera = Camera
{ _camCenter :: Point2
, _camRot :: Float
@@ -28,8 +34,10 @@ data Camera = Camera
}
makeLenses ''Camera
makeLenses ''CamInGameType
concat
<$> mapM
(deriveJSON defaultOptions)
[''CamControl
[''CamInGameType
,''CamControl
,''Camera ]
+1 -1
View File
@@ -191,7 +191,7 @@ data HeldItemType
| TRACTORGUN
| LAUNCHER
| LAUNCHERX {_xNum :: Int}
| REMOTELAUNCHER
-- | REMOTELAUNCHER
| POISONSPRAYER
| DRONELAUNCHER
| SHATTERGUN
+3 -3
View File
@@ -14,11 +14,11 @@ import Control.Lens
data Huse
= HeldDoNothing
| HeldFireRemoteShell
-- | HeldFireRemoteShell
| HeldExplodeRemoteShell Int Int
| HeldDetectorEffect Detector
| HeldForceField
| HeldShatter
-- | HeldShatter
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Cuse
@@ -58,7 +58,7 @@ data Luse
data HeldMod
= PistolMod
| FireRemoteShellMod
-- | FireRemoteShellMod
| ExplodeRemoteShellMod
| DoNothingMod
deriving (Eq, Ord, Show, Read) --Generic, Flat)
+1 -1
View File
@@ -112,7 +112,7 @@ data AmmoParams
| ProjectileParams
{ _ampPayload :: Payload
, _ampPjDraw :: ProjectileDraw
, _ampPjCreation :: ProjectileCreate
-- , _ampPjCreation :: ProjectileCreate
}
| GasParams {_ampCreateGas :: GasFuel}
deriving (Eq, Show, Read) --Generic, Flat)
+7 -5
View File
@@ -24,14 +24,16 @@ data ProjectileCreate = CreateShell | CreateTrackingShell
data ProjectileUpdate
= PJThrust {_pjuStart :: Int, _pjuEnd :: Int}
| PJSpin {_pjuTime :: Int, _pjuCID :: Int, _pjuSpinAmound :: Int}
| PJTrack {_pjuStart :: Int, _pjuEnd :: Int, _pjuCRID :: Int}
-- | PJTrack {_pjuStart :: Int, _pjuEnd :: Int, _pjuScreenID :: Int}
| PJRemoteSetDirection {_pjuStart :: Int, _pjuEnd :: Int, _pjuScreenID :: Int}
| PJReduceSpin {_pjuReduceSpin :: Float}
| PJRemoteDirection {_pjuStart :: Int, _pjuEnd :: Int, _pjuCID :: Int, _pjuITID :: Int}
| PJSetScope {_pjuITID :: Int}
| PJRetireRemote {_pjuITID :: Int, _pjuTimer :: Int, _pjuPJID :: Int}
-- | PJRemoteDirection {_pjuStart :: Int, _pjuEnd :: Int, _pjuCID :: Int, _pjuITID :: Int}
-- | PJSetScope {_pjuITID :: Int}
| PJRetireRemote {_pjuItID :: Int, _pjuTimer :: Int, _pjuPJID :: Int}
| PJDecTimMvVel
| PJShellCollisionCheck
| PJRemoteShellCollisionCheck
| PJRemoteShellCollisionCheck {_pjuScreenID :: Int}
-- | PJRemoteShellExplosion
deriving (Show, Eq, Ord, Read) --Generic, Flat)
data AmmoType
+1 -1
View File
@@ -25,7 +25,7 @@ data Proj
, _prjTimer :: Int
, _prjZ :: Float
, _prjUpdates :: [ProjectileUpdate]
, _prjMITID :: Maybe Int
-- , _prjMITID :: Maybe Int
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)