Commit before tweaking placementn/room generation

This commit is contained in:
2025-09-23 09:52:52 +01:00
parent 4179115023
commit d1bb8a985b
18 changed files with 308 additions and 201 deletions
+4 -2
View File
@@ -86,7 +86,7 @@ doInPlacements (im, w) =
doRoomInPlacements :: IM.IntMap [Placement] -> GenWorld -> Room -> (GenWorld, Room)
doRoomInPlacements im w rm = foldr f (w, rm) $ _rmInPmnt rm
where
f (InPlacement plf i) (w', r') = fst $ placeSpot (w', r') (plf (w' ^. gwWorld) $ im IM.! i)
f (InPlacement plf i) (w', r') = fst $ placeSpot (w', r') (plf (w') $ im IM.! i)
doOutPlacements :: GenWorld -> (IM.IntMap [Placement], GenWorld)
doOutPlacements w =
@@ -109,7 +109,9 @@ doIndividualPlacements gw =
in gw' & genRooms .~ rms
doRoomPlacements :: GenWorld -> Room -> (GenWorld, Room)
doRoomPlacements w rm = foldl' (\wr -> fst . placeSpot wr) (w, rm) $ _rmPmnts rm
--doRoomPlacements w rm = foldl' (\wr -> fst . placeSpot wr) (w, rm) $ _rmPmnts rm
doRoomPlacements w rm = foldl' (\wr -> fst . placeSpot wr) (w, rm & rmPmnts .~ mempty)
$ _rmPmnts rm
setupWorldBounds :: World -> World
setupWorldBounds w =