Start to make wall flags/pathing interaction more sensible

This commit is contained in:
2025-10-23 11:35:24 +01:00
parent 9e6534b8f4
commit fc7c4d6468
18 changed files with 167 additions and 145 deletions
+8 -7
View File
@@ -8,12 +8,13 @@ The warnings have been disabled.
-}
module Dodge.Data.PathGraph where
import Dodge.Data.Wall.Structure
import Control.Lens
import Data.Aeson
import Data.Aeson.TH
import Data.Graph.Inductive
--import Data.Map.Strict (Map)
import qualified Data.Set as Set
import qualified Data.Set as S
--import Geometry.Data
--data PathGraph = PathGraph
@@ -41,17 +42,17 @@ import qualified Data.Set as Set
data SimpleEdge = SimpleEdge
{ _seDist :: Float
, _seObstacles :: Set.Set EdgeObstacle
, _seObstacles :: S.Set EdgeObstacle
}
deriving (Eq, Ord, Show, Read) --Generic, Flat)
data EdgeObstacle
= BlockObstacle
| DoorObstacle
| AutoDoorObstacle
| WallObstacle
= WallObstacle WallFlag
| ChasmObstacle
deriving (Eq, Ord, Show, Bounded, Enum, Read) --Generic, Flat)
deriving (Eq, Ord, Show, Read) --Generic, Flat)
switchWallObs :: S.Set EdgeObstacle
switchWallObs = S.fromList $ WallObstacle <$> [WallBlockVisibility,WallNotAutoOpen]
--instance (ToJSON a, ToJSON b) => ToJSON (Gr a b) where
-- toEncoding = genericToEncoding defaultOptions