Commit before complicating zoning

This commit is contained in:
2022-06-28 14:35:49 +01:00
parent 9801a40b9e
commit 4965934502
6 changed files with 57 additions and 48 deletions
+8 -7
View File
@@ -7,6 +7,7 @@ circular imports are probably not a good idea.
{-# LANGUAGE StrictData #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
module Dodge.Data
( module Dodge.Data
, module Dodge.Data.Material
@@ -103,13 +104,13 @@ data World = World
, _boundBox :: [Point2]
, _boundDist :: (Float,Float,Float,Float) -- NSEW, S and W negative
, _creatures :: IM.IntMap Creature
, _creaturesZone :: Zone (IM.IntMap Creature)
, _creaturesZone :: Zoning (IM.IntMap Creature)
, _creatureGroups :: IM.IntMap CrGroupParams
, _itemPositions :: IM.IntMap ItemPos
, _clouds :: [Cloud]
, _cloudsZone :: Zone [Cloud]
, _cloudsZone :: Zoning [Cloud]
, _gusts :: IM.IntMap Gust
, _gustsZone :: Zone (IM.IntMap Gust)
, _gustsZone :: Zoning (IM.IntMap Gust)
, _props :: IM.IntMap Prop
, _instantParticles :: [Particle]
, _particles :: [Particle]
@@ -124,7 +125,7 @@ data World = World
, _blocks :: IM.IntMap Block
, _coordinates :: IM.IntMap Point2
, _triggers :: IM.IntMap (World -> Bool)
, _wallsZone :: Zone (IM.IntMap Wall)
, _wallsZone :: Zoning (IM.IntMap Wall)
, _floorItems :: IM.IntMap FloorItem
, _floorTiles :: [(Point3,Point3)]
, _randGen :: StdGen
@@ -144,7 +145,7 @@ data World = World
, _clickMousePos :: Point2
, _pathGraph :: Gr Point2 Float
, _pathGraphP :: S.Set (Point2,Point2)
, _pathPoints :: IM.IntMap (IM.IntMap [(Int,Point2)])
, _pathPoints :: Zoning [(Int,Point2)]
, _hud :: HUD
, _lightSources :: IM.IntMap LightSource
, _tempLightSources :: [TempLightSource]
@@ -1326,7 +1327,7 @@ data Goal
| SentinelAt Point2 Float
deriving (Show)
newtype Zone a = Zone
newtype Zoning a = Zoning
{ _znObjects :: IM.IntMap (IM.IntMap a)
}
data DamageEffect
@@ -1514,7 +1515,7 @@ makeLenses ''Block
makeLenses ''Terminal
makeLenses ''Machine
makeLenses ''MachineType
makeLenses ''Zone
makeLenses ''Zoning
makeLenses ''ItemDimension
makeLenses ''Vocalization
makeLenses ''Universe