This commit is contained in:
2022-06-14 12:48:48 +01:00
parent 79aab975c8
commit e1f3a774b2
2 changed files with 10 additions and 15 deletions
+4 -2
View File
@@ -334,7 +334,9 @@ spawnerRoom :: RandomGen g => State g (Tree Room)
spawnerRoom = do
x <- state $ randomR (250,300)
y <- state $ randomR (300,400)
roomWithSpawner <- roomC x y <&>
rmPmnts .:~ spNoID (PSRoomRand 0 (uncurry PS)) (PutCrit spawnerCrit)
roomWithSpawner <- roomC x y <&> rmPmnts .:~ spNoID
(rprBool $ \rp _ -> _rpPlacementUse rp == 0 && RoomPosOnPath `S.member` _rpType rp
&& xV2 (_rpPos rp) < x/2 && yV2 (_rpPos rp) < y/2 )
(PutCrit spawnerCrit)
aRoom <- airlock
return $ treeFromTrunk [ aRoom, corridor] $ pure $ cleatOnward roomWithSpawner