This commit is contained in:
2024-09-27 21:55:17 +01:00
parent dd6cbc0bfb
commit 6c3d0d5def
21 changed files with 232 additions and 333 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ data Item = Item
, _itDimension :: ItemDimension
, _itCurseStatus :: CurseStatus
, _itTweaks :: ItemTweaks
, _itScope :: Scope
-- , _itScope :: Scope
, _itParams :: ItemParams
, _itAttachments :: Set ItemAttachment
}
-5
View File
@@ -20,11 +20,6 @@ data Scope
, _opticZoom :: Float
, _opticDefaultZoom :: Float
}
| RemoteScope
{ -- | a camera offset, note unlike the optic pos this is absolute
_remotePos :: Point2
, _remoteZoom :: Float
}
deriving (Eq, Show, Read) --Generic, Flat)
makeLenses ''Scope
+7 -2
View File
@@ -12,8 +12,10 @@ module Dodge.Data.Item.Use (
module Dodge.Data.Hammer,
module Dodge.Data.Item.Targeting,
module Dodge.Data.GenFloat,
module Dodge.Data.Item.Scope
) where
import Dodge.Data.Item.Scope
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
@@ -67,6 +69,10 @@ data ItemUse
, _amagParams :: AmmoParams
, _amagType :: AmmoType
}
| ScopeUse
{ -- | a camera offset
_scopeScope :: Scope
}
deriving (Eq, Show, Read) --Generic, Flat)
data TriggerType
@@ -111,8 +117,7 @@ data AmmoParams
= BulletParams {_ampBullet :: Bullet}
| ProjectileParams
{ _ampPayload :: Payload
, _ampPjDraw :: ProjectileDraw
-- , _ampPjCreation :: ProjectileCreate
-- , _ampPjDraw :: ProjectileDraw
}
| GasParams {_ampCreateGas :: GasFuel}
deriving (Eq, Show, Read) --Generic, Flat)
+1 -1
View File
@@ -102,7 +102,7 @@ data LWorld = LWorld
, _clouds :: [Cloud]
, _gusts :: IM.IntMap Gust
, _props :: IM.IntMap Prop
, _projectiles :: IM.IntMap Proj
, _projectiles :: IM.IntMap Projectile
, _instantBullets :: [Bullet]
, _bullets :: [Bullet]
, _radarSweeps :: [RadarSweep]
+3 -3
View File
@@ -11,7 +11,7 @@ import Data.Aeson.TH
import Dodge.Data.Item.Use.Consumption.Ammo
import Geometry.Data
data Proj
data Projectile
= Shell
{ _prjPos :: Point2
, _prjStartPos :: Point2
@@ -29,5 +29,5 @@ data Proj
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Proj
deriveJSON defaultOptions ''Proj
makeLenses ''Projectile
deriveJSON defaultOptions ''Projectile