Continue link cleanup

This commit is contained in:
2022-03-05 01:29:24 +00:00
parent 0c580e63a4
commit f82bd3f788
5 changed files with 22 additions and 24 deletions
+9 -7
View File
@@ -38,7 +38,7 @@ 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))
]
changeLinkFrom fromCond $ roomRectAutoLinks w h
randomiseAllLinks $ restrictOutLinks fromCond $ roomRectAutoLinks w h
& rmPmnts %~ (wl : )
& rmRandPSs .~ [farside]
where
@@ -484,12 +484,14 @@ pistolerRoom = pillarGrid
shootingRange :: RandomGen g => State g (SubCompTree Room)
shootingRange = do
rm1 <- shootersRoom1 >>= changeLinkTo (\(V2 _ y,_) -> y < 40)
>>= changeLinkFrom (\(V2 _ y,r) -> y > 200 && r /= 0)
rm2 <- shootersRoom >>= changeLinkTo (\(V2 x y,_) -> y < 10 && x > 20 && x < 180)
>>= changeLinkFrom (\(V2 _ y,r) -> y > 200 && r /= 0)
rm3 <- shootersRoom >>= changeLinkTo (\(V2 x y,_) -> y < 10 && x > 20 && x < 180)
>>= changeLinkFrom (\(_,r) -> r == 0)
rm1 <- shootersRoom1 >>= randomiseAllLinks . restrictInLinks (\(V2 _ y,_) -> y < 40)
. restrictOutLinks (\(V2 _ y,r) -> y > 200 && r /= 0)
rm2 <- shootersRoom >>= randomiseAllLinks
. restrictInLinks (\(V2 x y,_) -> y < 10 && x > 20 && x < 180)
. restrictOutLinks (\(V2 _ y,r) -> y > 200 && r /= 0)
rm3 <- shootersRoom >>= randomiseAllLinks
. restrictInLinks (\(V2 x y,_) -> y < 10 && x > 20 && x < 180)
. restrictOutLinks (\(_,r) -> r == 0)
return $ treeFromPost
[PassDown rm1
,PassDown $ roomPadCut (rectNSWE 40 (-40) (-80) 80) (V2 0 20)