Separate out ammo data

This commit is contained in:
2022-07-20 15:01:01 +01:00
parent 8142899be1
commit 2755a4ffdd
14 changed files with 242 additions and 262 deletions
+4 -24
View File
@@ -10,6 +10,7 @@ circular imports are probably not a good idea.
{-# LANGUAGE DerivingStrategies #-}
module Dodge.Data
( module Dodge.Data
, module Dodge.Data.Gas
, module Dodge.Data.Ammo
, module Dodge.Data.Payload
, module Dodge.Data.RadarSweep
@@ -55,6 +56,7 @@ module Dodge.Data
, module Dodge.Data.RadarBlip
, module Dodge.Data.PathGraph
) where
import Dodge.Data.Gas
import Dodge.Data.Ammo
import Dodge.Data.Payload
import Dodge.Data.RadarSweep
@@ -591,27 +593,6 @@ type HitEffect' = Flame
-> World
-> (World,Maybe Flame)
data AmmoType
= ProjectileAmmo
{ _amPayload :: Payload
, _amString :: String
, _amPjDraw :: ProjectileDraw
, _amPjCreation :: Item -> Creature -> World -> World
}
| BulletAmmo
{ _amString :: String
, _amBullet :: Bullet
}
| DroneAmmo
{ _amString :: String }
| GasAmmo
{ _amString :: String
, _amCreateGas :: Float -> Point2 -> Float -> Creature -> World -> World
}
| ForceFieldAmmo
{ _amForceFieldType :: Wall
}
| GenericAmmo
data ItemTweaks
= NoTweaks
| Tweakable
@@ -726,8 +707,8 @@ data Proj
, _prjVel :: Point2
, _prjDraw :: ProjectileDraw
, _prjID :: Int
, _prjUpdate :: Proj -> World -> World
, _prjPayload :: Payload
, _prjMITID :: Maybe Int
}
| Shell
{ _prjPos :: Point2
@@ -738,11 +719,11 @@ data Proj
, _prjSpin :: Float
, _prjDraw :: ProjectileDraw
, _prjID :: Int
, _prjUpdate :: Proj -> World -> World
, _prjPayload :: Payload
, _prjTimer :: Int
, _prjZ :: Float
, _prjUpdates :: [ProjectileUpdate]
, _prjMITID :: Maybe Int
}
data Prop
= PropZ
@@ -1299,7 +1280,6 @@ makeLenses ''ItemUse
makeLenses ''ItEffect
makeLenses ''FloorItem
makeLenses ''ItemConsumption
makeLenses ''AmmoType
makeLenses ''TweakParam
makeLenses ''Prop
makeLenses ''Proj