Cleanup
This commit is contained in:
+13
-12
@@ -37,8 +37,9 @@ roomC w h = do
|
||||
[ sPS (V2 0 0) 0 $ PutWall (rectNSWE (h-60) 0 (w/2-10) (w/2+10)) defaultCrystalWall
|
||||
, windowLine (V2 (w/2) 0) (V2 (w/2) (h-60))
|
||||
]
|
||||
randomiseAllLinks $ restrictOutLinks fromCond $ roomRectAutoLinks w h
|
||||
& rmPmnts %~ (wl : )
|
||||
shuffleLinks $ roomRectAutoLinks w h
|
||||
& restrictOutLinks fromCond
|
||||
& rmPmnts .:~ wl
|
||||
& rmRandPSs .~ [farside]
|
||||
where
|
||||
fromCond (V2 x _,_) = x < w / 2 - 10
|
||||
@@ -92,15 +93,15 @@ glassSwitchBack = do
|
||||
& rmName .~ "glassSwitchBack"
|
||||
|
||||
glassSwitchBackCrits :: RandomGen g => State g Room
|
||||
glassSwitchBackCrits = glassSwitchBack
|
||||
<&> rmPmnts %~ ([spNoID (PSRoomRand 0 (uncurry PS)) (PutCrit miniGunCrit)
|
||||
, spNoID (PSRoomRand 1 (uncurry PS)) randC1
|
||||
] ++)
|
||||
glassSwitchBackCrits = glassSwitchBack <&> rmPmnts .++~
|
||||
[ spNoID (PSRoomRand 0 (uncurry PS)) (PutCrit miniGunCrit)
|
||||
, spNoID (PSRoomRand 1 (uncurry PS)) randC1
|
||||
]
|
||||
|
||||
miniTree2 :: RandomGen g => State g (Tree Room)
|
||||
miniTree2 = (glassSwitchBackCrits
|
||||
>>= randomiseAllLinks . restrictInLinks (\p -> (sndV2 . fst) p < 70))
|
||||
<&> flip branchWith (replicate 3 $ treeFromPost [door,corridor] critInDeadEnd)
|
||||
miniTree2 = do
|
||||
rm <- glassSwitchBackCrits >>= shuffleLinks . restrictInLinks (\p -> (sndV2 . fst) p < 70)
|
||||
return $ branchWith rm (replicate 3 $ treePost [door,corridor,critInDeadEnd])
|
||||
|
||||
miniRoom3 :: RandomGen g => State g (Tree Room)
|
||||
miniRoom3 = do
|
||||
@@ -412,12 +413,12 @@ pistolerRoom = pillarGrid
|
||||
|
||||
shootingRange :: RandomGen g => State g (LabTree Room)
|
||||
shootingRange = do
|
||||
rm1 <- shootersRoom1 >>= randomiseAllLinks . restrictInLinks (\(V2 _ y,_) -> y < 40)
|
||||
rm1 <- shootersRoom1 >>= shuffleLinks . restrictInLinks (\(V2 _ y,_) -> y < 40)
|
||||
. restrictOutLinks (\(V2 _ y,r) -> y > 200 && r /= 0)
|
||||
rm2 <- shootersRoom >>= randomiseAllLinks
|
||||
rm2 <- shootersRoom >>= shuffleLinks
|
||||
. restrictInLinks (\(V2 x y,_) -> y < 10 && x > 20 && x < 180)
|
||||
. restrictOutLinks (\(V2 _ y,r) -> y > 200 && r /= 0)
|
||||
rm3 <- shootersRoom >>= randomiseAllLinks
|
||||
rm3 <- shootersRoom >>= shuffleLinks
|
||||
. restrictInLinks (\(V2 x y,_) -> y < 10 && x > 20 && x < 180)
|
||||
. restrictOutLinks (\(_,r) -> r == 0)
|
||||
return ( toOnward "shootingRange"
|
||||
|
||||
Reference in New Issue
Block a user