Make zoning more universal

This commit is contained in:
2022-06-28 19:04:31 +01:00
parent 4965934502
commit b1a7e1bf35
16 changed files with 152 additions and 97 deletions
+7 -9
View File
@@ -14,6 +14,7 @@ module Dodge.Data
, module Dodge.Data.LoadAction
, module Dodge.Data.ForegroundShape
, module Dodge.Data.Wall
, module Dodge.Data.Zoning
, module Dodge.Data.Bounds
, module Dodge.Combine.Data
, module Dodge.Distortion.Data
@@ -33,6 +34,7 @@ module Dodge.Data
, module Dodge.Data.Room
) where
import Dodge.Data.Room
import Dodge.Data.Zoning
import Dodge.Data.ForegroundShape
import Dodge.Data.LoadAction
import Dodge.Data.Material
@@ -104,13 +106,13 @@ data World = World
, _boundBox :: [Point2]
, _boundDist :: (Float,Float,Float,Float) -- NSEW, S and W negative
, _creatures :: IM.IntMap Creature
, _creaturesZone :: Zoning (IM.IntMap Creature)
, _crZoning :: Zoning IM.IntMap Creature
, _creatureGroups :: IM.IntMap CrGroupParams
, _itemPositions :: IM.IntMap ItemPos
, _clouds :: [Cloud]
, _cloudsZone :: Zoning [Cloud]
, _clZoning :: Zoning [] Cloud
, _gusts :: IM.IntMap Gust
, _gustsZone :: Zoning (IM.IntMap Gust)
, _gsZoning :: Zoning IM.IntMap Gust
, _props :: IM.IntMap Prop
, _instantParticles :: [Particle]
, _particles :: [Particle]
@@ -125,7 +127,7 @@ data World = World
, _blocks :: IM.IntMap Block
, _coordinates :: IM.IntMap Point2
, _triggers :: IM.IntMap (World -> Bool)
, _wallsZone :: Zoning (IM.IntMap Wall)
, _wlZoning :: Zoning IM.IntMap Wall
, _floorItems :: IM.IntMap FloorItem
, _floorTiles :: [(Point3,Point3)]
, _randGen :: StdGen
@@ -145,7 +147,7 @@ data World = World
, _clickMousePos :: Point2
, _pathGraph :: Gr Point2 Float
, _pathGraphP :: S.Set (Point2,Point2)
, _pathPoints :: Zoning [(Int,Point2)]
, _phZoning :: Zoning [] (Int,Point2)
, _hud :: HUD
, _lightSources :: IM.IntMap LightSource
, _tempLightSources :: [TempLightSource]
@@ -1327,9 +1329,6 @@ data Goal
| SentinelAt Point2 Float
deriving (Show)
newtype Zoning a = Zoning
{ _znObjects :: IM.IntMap (IM.IntMap a)
}
data DamageEffect
= PushDamage
{ _dePush :: Float
@@ -1515,7 +1514,6 @@ makeLenses ''Block
makeLenses ''Terminal
makeLenses ''Machine
makeLenses ''MachineType
makeLenses ''Zoning
makeLenses ''ItemDimension
makeLenses ''Vocalization
makeLenses ''Universe