diff --git a/src/Dodge/Data.hs b/src/Dodge/Data.hs index b2f9c0ca2..5572b2dff 100644 --- a/src/Dodge/Data.hs +++ b/src/Dodge/Data.hs @@ -74,7 +74,9 @@ module Dodge.Data , module Dodge.Data.RadarBlip , module Dodge.Data.PathGraph , module Dodge.Data.Gust + , module Dodge.Data.Projectile ) where +import Dodge.Data.Projectile import Dodge.Data.Gust import Dodge.Data.CrGroupParams import Dodge.Data.Corpse @@ -440,31 +442,6 @@ data Modification , _mdExternalID2 :: Int , _mdUpdate :: Modification -> World -> World } -data Proj - = RemoteShell - { _prjPos :: Point2 - , _prjStartPos :: Point2 - , _prjVel :: Point2 - , _prjDraw :: ProjectileDraw - , _prjID :: Int - , _prjPayload :: Payload - , _prjMITID :: Maybe Int - } - | Shell - { _prjPos :: Point2 - , _prjStartPos :: Point2 - , _prjVel :: Point2 - , _prjAcc :: Point2 - , _prjDir :: Float - , _prjSpin :: Float - , _prjDraw :: ProjectileDraw - , _prjID :: Int - , _prjPayload :: Payload - , _prjTimer :: Int - , _prjZ :: Float - , _prjUpdates :: [ProjectileUpdate] - , _prjMITID :: Maybe Int - } data Prop = PropZ { _prPos :: Point2 @@ -723,7 +700,6 @@ data InPlacement = InPlacement makeLenses ''World makeLenses ''FloorItem makeLenses ''Prop -makeLenses ''Proj makeLenses ''Modification makeLenses ''Particle makeLenses ''PressPlate diff --git a/src/Dodge/Data/Projectile.hs b/src/Dodge/Data/Projectile.hs index 858bbbb89..b913003ac 100644 --- a/src/Dodge/Data/Projectile.hs +++ b/src/Dodge/Data/Projectile.hs @@ -1,8 +1,35 @@ ---{-# LANGUAGE TemplateHaskell #-} ---{-# LANGUAGE StrictData #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE StrictData #-} module Dodge.Data.Projectile where ---import Dodge.Data.Ammo ---import Geometry.Data ---import Control.Lens +import Dodge.Data.Payload +import Dodge.Data.Ammo +import Geometry.Data +import Control.Lens data ProjectileType = ShellType +data Proj + = RemoteShell + { _prjPos :: Point2 + , _prjStartPos :: Point2 + , _prjVel :: Point2 + , _prjDraw :: ProjectileDraw + , _prjID :: Int + , _prjPayload :: Payload + , _prjMITID :: Maybe Int + } + | Shell + { _prjPos :: Point2 + , _prjStartPos :: Point2 + , _prjVel :: Point2 + , _prjAcc :: Point2 + , _prjDir :: Float + , _prjSpin :: Float + , _prjDraw :: ProjectileDraw + , _prjID :: Int + , _prjPayload :: Payload + , _prjTimer :: Int + , _prjZ :: Float + , _prjUpdates :: [ProjectileUpdate] + , _prjMITID :: Maybe Int + } +makeLenses ''Proj