This commit is contained in:
2025-10-24 10:58:01 +01:00
parent c39f99e146
commit 18ab89d3f2
7 changed files with 8 additions and 72 deletions
+2 -5
View File
@@ -86,7 +86,6 @@ plLineBlock basePane blwidth a b gw =
, _blShadows = shadowsAt i
, _blDir = 0 -- THIS IS NOT SENSIBLE. TODO rethink block positioning
, _blFootprint = cornersAt p -- TODO check winding (clockwise, anticlockwise)
, _blObstructs = mempty
, _blMaterial = _wlMaterial basePane
, _blHeight = 100
, _blPos = p
@@ -114,11 +113,9 @@ plLineBlock basePane blwidth a b gw =
-- | Must be done after inserting the block
insertWalls :: Int -> [Wall] -> World -> World
insertWalls blid wls w = w' & cWorld . lWorld . blocks . ix blid . blObstructs .~ concat paths
where
(w', paths) = mapAccumR (flip insertWall) w wls
insertWalls _ wls w = foldl' (flip insertWall) w wls
insertWall :: Wall -> World -> (World, [(Int,Int)])
insertWall :: Wall -> World -> World
insertWall wl =
uncurry (obstructPathsCrossing (S.fromList [WallObstacle WallNotAutoOpen, WallObstacle WallBlockVisibility]))
(_wlLine wl)
+1 -1
View File
@@ -61,7 +61,7 @@ addDoorWall eo drid wl w (wlid, wlps) =
}
-- & cWorld . lWorld . doors . ix drid . drObstructs <>~ es
where
(w', _) = uncurry (obstructPathsCrossing eo) wlps w
w' = uncurry (obstructPathsCrossing eo) wlps w
updateDoorEdges :: EdgeObstacle -> [(Int,Int)] -> World -> World
updateDoorEdges eo es w = foldl' (updateDoorEdge eo) w es