Work on rocket/grenade launcher

This commit is contained in:
2024-12-27 21:46:46 +00:00
parent 0ef28c132e
commit 5c749bff63
19 changed files with 400 additions and 324 deletions
+4 -2
View File
@@ -21,9 +21,10 @@ data ComposeLinkType
| AmmoEffectLink
| WeaponScopeLink
| WeaponTargetingLink
| RemoteControllerLink
| JoystickLink
| RemoteScreenLink
| RemoteDetonatorLink
| SmokeReducerLink
| AugmentedHUDLink
| FunctionChangeLink
| MakeAutoLink
@@ -39,8 +40,9 @@ data ItemStructuralFunction
| AugmentedHUDSF
| AmmoMagSF AmmoType
| RemoteScreenSF
| RemoteControllerSF
| JoystickSF
| RemoteDetonatorSF
| SmokeReducerSF
| UncomposableIsolateSF
| AmmoModifierSF AmmoType
| AmmoTargetingSF AmmoType
+2 -1
View File
@@ -70,8 +70,9 @@ data AttachType
= ZOOMSCOPE
| BULLETSYNTH
| REMOTESCREEN
| REMOTECONTROLLER
| JOYSTICK
| REMOTEDETONATOR
| SMOKEREDUCER
| HOMINGMODULE
| AUGMENTEDHUD
| SHELLPAYLOAD {_shellPayload :: Payload}
+2
View File
@@ -70,6 +70,8 @@ data TriggerType = AutoTrigger | HammerTrigger
data AttachParams
= APLinkProjectile
{_apLinkedProjectile :: Maybe Int}
| APProjectiles
{_apProjectiles :: [Int]}
| APInt {_apInt :: Int}
| APNothing
deriving (Eq, Show, Read)
+3 -2
View File
@@ -27,11 +27,12 @@ data ProjectileHoming
deriving (Show, Eq, Ord, Read) --Generic, Flat)
data ProjectileUpdate
= ThrustPU {_pjuStart :: Int, _pjuEnd :: Int}
= ThrustPU {_pjuStart :: Int, _pjuEnd :: Int, _pjuSmokeless :: Bool}
| StartSpinPU {_pjuTime :: Int, _pjuCID :: Int, _pjuSpinAmound :: Int}
| RemoteDirectionPU {_pjuStart :: Int, _pjuEnd :: Int, _pjuControllerID :: ProjectileHoming}
| ReduceSpinPU {_pjuReduceSpin :: Float}
| DestroyPU {_pjuScreenID :: Maybe (NewInt ItmInt), _pjuTimer :: Int}
| DestroyPU {_pjuScreenID :: Maybe (NewInt ItmInt)
,_pjuTimer :: Int}
| TimePU
| CollisionEffectPU {_pjuControlID :: Maybe (NewInt ItmInt)
,_pjuDetonatorID :: Maybe (NewInt ItmInt)
+7
View File
@@ -11,6 +11,11 @@ import Data.Aeson.TH
import Dodge.Data.Item.Use.Consumption.Ammo
import Geometry.Data
data ProjectileType
= Grenade
| Rocket
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Projectile
= Shell
{ _prjPos :: Point2
@@ -25,8 +30,10 @@ data Projectile
, _prjZ :: Float
, _prjZVel :: Float
, _prjUpdates :: [ProjectileUpdate]
, _prjType :: ProjectileType
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Projectile
deriveJSON defaultOptions ''ProjectileType
deriveJSON defaultOptions ''Projectile