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