Refactor wall zoning, remove streaming
This commit is contained in:
@@ -3,6 +3,7 @@ module Dodge.Placement.PlaceSpot.TriggerDoor
|
||||
( plDoor
|
||||
, plSlideDoor
|
||||
) where
|
||||
import Dodge.Zoning.Wall
|
||||
import Dodge.Data
|
||||
import Dodge.Zone
|
||||
import Dodge.Base
|
||||
@@ -117,7 +118,7 @@ maybeClearDoorPaths eo es w = foldl' (maybeClearDoorPath eo) w es
|
||||
|
||||
maybeClearDoorPath :: EdgeObstacle -> World -> (Int,Int,PathEdge) -> World
|
||||
maybeClearDoorPath eo w (x,y,pe)
|
||||
| runIdentity . S.any_ (const True) $ overlapSegWalls (_peStart pe) (_peEnd pe) $ wlsNearSeg (_peStart pe) (_peEnd pe) w
|
||||
| not . null $ overlapSegWalls (_peStart pe) (_peEnd pe) $ wlsNearSeg (_peStart pe) (_peEnd pe) w
|
||||
= w & pathGraph %~ FGL.insEdge (x,y,pe & peObstacles . at eo ?~ ()) . FGL.delEdge (x,y)
|
||||
| otherwise
|
||||
= w & pathGraph %~ FGL.insEdge (x,y,pe & peObstacles . at eo .~ Nothing) . FGL.delEdge (x,y)
|
||||
|
||||
Reference in New Issue
Block a user