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
+3 -2
View File
@@ -6,6 +6,7 @@
-}
module Dodge.Placement.PlaceSpot (placeSpot) where
import qualified Data.Set as S
import Color
import Control.Monad.State
import Data.Bifunctor
@@ -165,7 +166,7 @@ placeChasm gw rid ps shiftps =
& gwWorld %~ f
where
f w = foldl' g w (loopPairs shiftps)
g w (x,y) = fst $ obstructPathsCrossing ChasmObstacle x y w
g w (x,y) = fst $ obstructPathsCrossing (S.singleton ChasmObstacle) x y w
--evaluateRandPS
-- :: Int -> State StdGen PSType -> PlacementSpot -> GenWorld -> (Int, GenWorld)
@@ -185,7 +186,7 @@ placeWallPoly qs wl w = foldl' (addPane wl) w pairs
addPane :: Wall -> World -> (Point2, Point2) -> World
addPane wl w l =
w & plNew (cWorld . lWorld . walls) wlID (wl & wlLine .~ l)
& fst . uncurry (obstructPathsCrossing WallObstacle) l
& fst . uncurry (obstructPathsCrossing (S.fromList [WallObstacle WallNotAutoOpen])) l
mvProp :: Point2 -> Float -> Prop -> Prop
mvProp p a = (prRot +~ a) . (prPos %~ ((p +.+) . rotateV a))