Allow creatures to path around chasms

This commit is contained in:
2025-10-16 23:52:25 +01:00
parent 0481f6e6f2
commit 5ba642c20a
4 changed files with 30 additions and 44 deletions
-36
View File
@@ -1,36 +0,0 @@
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE StrictData #-}
module Dodge.Data.PathGraph where
import Geometry.Data
import Control.Lens
import Data.Graph.Inductive
import qualified Data.Set as Set
import Data.Map.Strict (Map)
data PathGraph = PathGraph
{ _pgGraph :: Gr Point2 PathEdge
, _pgNodeMap :: Map Point2 Int
, _pgNodeCount :: Int
, _pgEdgeMap :: Map (V2 Point2) (Int,Int,PathEdge)
}
data PathEdge = PathEdge
{_peStart :: Point2
,_peEnd :: Point2
<<<<<<< HEAD
=======
,_peDist :: Float
>>>>>>> efficientRuntime
,_peObstacles :: Set.Set EdgeObstacle
}
deriving (Eq,Ord,Show)
data EdgeObstacle
= BlockObstacle
| DoorObstacle
| AutoDoorObstacle
| WallObstacle
deriving (Eq,Ord,Show,Bounded,Enum)
makeLenses ''PathGraph
<<<<<<< HEAD
=======
makeLenses ''PathEdge
>>>>>>> efficientRuntime