Commit before tweaking placementn/room generation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user