Commit before potential Door refactor

This commit is contained in:
2025-10-21 19:56:48 +01:00
parent fcffbd5f43
commit 2f3a00a971
8 changed files with 118 additions and 258 deletions
-4
View File
@@ -45,17 +45,13 @@ generateLevelFromRoomList gr' w =
. worldToGenWorld rs'
$ w & cWorld . lWorld . walls .~ wallsFromRooms rs
& cWorld . cwGen . cwgGameRooms .~ gameRoomsFromRooms (IM.elems rs')
-- & cWorld . pathGraph .~ path
& cWorld . incNode .~ inodes
& cWorld . incGraph .~ igraph
& cWorld . incEdges .~ ipairs
-- & pnZoning .~ foldl' (flip zonePn) mempty (labNodes path)
-- & peZoning .~ foldl' (flip zonePe) mempty (map fromEdgeTuple $ labEdges path)
& incNodeZoning .~ UV.ifoldl' (\m i p -> zonePn (i,p) m) mempty inodes
& incEdgeZoning .~ foldl' (flip (zoneIncPe inodes)) mempty ipairs
where
pairs = snapToGrid $ foldMap _rmPath rs
-- (_, path) = pairsToGraph pairs
(inodes,igraph,ipairs) = pairsToIncGraph pairs
rs = map doRoomShift $ IM.elems rs'
rs' = mapM shuffleRoomPos gr' & evalState $ _randGen w