Start adding pulseLasers

This commit is contained in:
2025-07-19 22:05:46 +01:00
parent 27ce087e33
commit 8b17ec56ad
13 changed files with 475 additions and 454 deletions
+1
View File
@@ -62,6 +62,7 @@ data CraftType
| PUMP
| MOTOR
| TRANSFORMER
| CAPACITOR
| PRISM
| LIGHTER
| MAGNET
+3
View File
@@ -43,8 +43,10 @@ module Dodge.Data.LWorld (
module Dodge.Data.TractorBeam,
module Dodge.Data.Wall,
module Dodge.Data.WorldEffect,
module Dodge.Data.PulseLaser,
) where
import Dodge.Data.PulseLaser
import Dodge.Data.Equipment.Misc
import Control.Lens
import Data.Aeson
@@ -114,6 +116,7 @@ data LWorld = LWorld
, _arcNode :: M.Map ArcNodeType Int
, _shockwaves :: [Shockwave]
, _lasers :: [Laser]
, _pulseLasers :: [PulseLaser]
, _linearShockwaves :: IM.IntMap LinearShockwave
, _tractorBeams :: [TractorBeam]
, _walls :: IM.IntMap Wall
+28
View File
@@ -0,0 +1,28 @@
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Dodge.Data.PulseLaser where
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Geometry.Data
data PulseLaser = PulseLaser
{ _pzPhaseV :: Float
, _pzPos :: Point2
, _pzDir :: Float
, _pzDamage :: Int
, _pzTimer :: Int
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data PulseBall = PulseBall
{ _pbVel :: Point2
, _pbPos :: Point2
, _pbTimer :: Int
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''PulseLaser
deriveJSON defaultOptions ''PulseLaser