Start to make wall flags/pathing interaction more sensible
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user