Split gasses and clouds

This commit is contained in:
2025-12-02 21:47:17 +00:00
parent 984a114310
commit b2cb8cfe11
11 changed files with 262 additions and 192 deletions
+14 -1
View File
@@ -21,7 +21,6 @@ data CloudType
= Smoke
| RocketSmoke
| CryoReleaseCloud
| GasCloud
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Dust = Dust
@@ -32,8 +31,22 @@ data Dust = Dust
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data Gas = Gas
{ _gsPos :: Point3
, _gsVel :: Point3
, _gsTimer :: Int
, _gsType :: GasType
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data GasType = PoisonGas
deriving (Eq, Ord, Show, Read) --Generic, Flat)
makeLenses ''Cloud
deriveJSON defaultOptions ''CloudType
deriveJSON defaultOptions ''Cloud
makeLenses ''Dust
deriveJSON defaultOptions ''Dust
makeLenses ''Gas
deriveJSON defaultOptions ''GasType
deriveJSON defaultOptions ''Gas
+1
View File
@@ -95,6 +95,7 @@ data LWorld = LWorld
, _items :: IM.IntMap Item
, _clouds :: [Cloud]
, _dusts :: [Dust]
, _gasses :: [Gas]
, _gusts :: IM.IntMap Gust
, _props :: IM.IntMap Prop
, _debris :: [Debris]
+1
View File
@@ -45,6 +45,7 @@ data World = World
, _worldEventFlags :: Set WorldEventFlag
, _crZoning :: IntMap (IntMap IntSet)
, _clZoning :: IntMap (IntMap [Cloud])
, _gasZoning :: IntMap (IntMap [Gas])
, _dsZoning :: IntMap (IntMap [Dust])
, _wlZoning :: IntMap (IntMap IntSet) -- Zoning IM.IntMap Wall
-- , _pnZoning :: IntMap (IntMap [(Int, Point2)]) --Zoning IM.IntMap Creature