Refactor path zoning
This commit is contained in:
+3
-5
@@ -2,10 +2,10 @@
|
||||
module Dodge.Layout
|
||||
( generateLevelFromRoomList
|
||||
) where
|
||||
import Dodge.Zoning.Pathing
|
||||
import Data.Tile
|
||||
import Dodge.Data
|
||||
import Dodge.Path
|
||||
import Dodge.Zone.Update
|
||||
import Dodge.ShiftPoint
|
||||
import Dodge.Placement.PlaceSpot
|
||||
--import Dodge.LevelGen.Data
|
||||
@@ -45,10 +45,8 @@ generateLevelFromRoomList gr' w = initWallZoning
|
||||
, _gameRooms = gameRoomsFromRooms (IM.elems rs')
|
||||
, _pathGraph = path
|
||||
}
|
||||
& pnZoning %~ (\zn -> foldl' (flip $ updateZoning (:)) (zn & znObjects .~ mempty)
|
||||
(labNodes path))
|
||||
& peZoning %~ (\zn -> foldl' (flip $ updateZoning (:)) (zn & znObjects .~ mempty)
|
||||
(labEdges path))
|
||||
& pnZoning .~ foldl' (flip $ zonePn) mempty (labNodes path)
|
||||
& peZoning .~ foldl' (flip $ zonePe) mempty (labEdges path)
|
||||
where
|
||||
(_,path) = pairsToGraph pairPath'
|
||||
pairPath = foldMap _rmPath rs
|
||||
|
||||
Reference in New Issue
Block a user