Cleanup
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user