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
+1
View File
@@ -16,6 +16,7 @@ worldToGenWorld rms w =
GenWorld
{ _gwWorld = w & cWorld . cwGen . cwgParams .~ evalState generateGenParams (_randGen w)
, _genRooms = rms
, _genPmnt = mempty
}
generateGenParams :: RandomGen g => State g GenParams
+2 -2
View File
@@ -54,7 +54,7 @@ ps0 pst = Placement (PS (V2 0 0) 0) pst Nothing . contToIDCont
pt0 :: PSType -> (Placement -> Maybe Placement) -> Placement
pt0 pst = Placement (PS (V2 0 0) 0) pst Nothing . const
contToIDCont :: (Int -> Maybe Placement) -> World -> Placement -> Maybe Placement
contToIDCont :: (Int -> Maybe Placement) -> GenWorld -> Placement -> Maybe Placement
contToIDCont f _ = f . fromJust . _plMID
jps0' :: PSType -> (Placement -> Maybe Placement) -> Maybe Placement
@@ -80,7 +80,7 @@ ps0PushPS :: PSType -> (Placement -> Maybe Placement) -> Placement
ps0PushPS pst f = Placement (PSNoShiftCont (V2 0 0) 0) pst Nothing $
\_ pl -> f pl & _Just . plSpot %~ const (_plSpot pl)
ps0PushPSw :: PSType -> (World -> Placement -> Maybe Placement) -> Placement
ps0PushPSw :: PSType -> (GenWorld -> Placement -> Maybe Placement) -> Placement
ps0PushPSw pst f = Placement (PSNoShiftCont (V2 0 0) 0) pst Nothing $
\w pl -> f w pl & _Just . plSpot %~ const (_plSpot pl)