Start cleanup of room in-links
This commit is contained in:
@@ -142,9 +142,8 @@ glassSwitchBackCrits = glassSwitchBack
|
||||
] ++)
|
||||
|
||||
miniTree2 :: RandomGen g => State g (SubCompTree Room)
|
||||
miniTree2 = glassSwitchBackCrits
|
||||
>>= randomiseOutLinks
|
||||
>>= changeLinkTo (\p -> (sndV2 . fst) p < 70)
|
||||
miniTree2 = restrictInLinks (\p -> (sndV2 . fst) p < 70) <$> glassSwitchBackCrits
|
||||
>>= randomiseAllLinks
|
||||
<&> flip branchWith (replicate 3 $ treeFromPost [door,corridor] critInDeadEnd)
|
||||
|
||||
miniRoom3 :: RandomGen g => State g (SubCompTree Room)
|
||||
@@ -189,7 +188,7 @@ roomMiniIntro = do
|
||||
return $ chainUses [return $ UseAll door, midroom,return $ UseAll corridor]
|
||||
|
||||
roomCenterPillar :: RandomGen g => State g Room
|
||||
roomCenterPillar = changeLinkTo ((\p -> dist p (V2 120 0) < 10) . fst)
|
||||
roomCenterPillar = randomiseAllLinks . restrictInLinks ((\p -> dist p (V2 120 0) < 10) . fst)
|
||||
$ set rmPmnts plmnts $ roomRect 240 240 2 2
|
||||
where
|
||||
plmnts =
|
||||
@@ -385,7 +384,7 @@ longRoom = do
|
||||
brls <- fmap (map (\p -> sPS (p +.+ V2 10 200) 0 $ PutCrit explosiveBarrel) )
|
||||
$ replicateM 5 $ randInRect (w-20) 900
|
||||
let rm = roomRect w (h+70) 1 1 & rmPolys %~ ([rectNSWE h (h-165) (-45) (w+45)] ++)
|
||||
changeLinkTo cond $ rm & rmPmnts .~ ws ++ brls ++ wsDefense ++
|
||||
return $ restrictInLinks cond $ rm & rmPmnts .~ ws ++ brls ++ wsDefense ++
|
||||
[sPS (V2 12.5 (h-25)) 0 $ PutCrit longCrit
|
||||
,sPS (V2 37.5 (h-25)) 0 $ PutCrit longCrit
|
||||
,sPS (V2 62.5 (h-25)) 0 $ PutCrit longCrit
|
||||
@@ -397,7 +396,7 @@ doubleCorridorBarrels :: RandomGen g => State g Room
|
||||
doubleCorridorBarrels = do
|
||||
h <- state $ randomR (200,300)
|
||||
let cond x = (sndV2 . fst) x < h - 40
|
||||
changeLinkTo cond $ roomRect 100 h 1 1 & rmPmnts .~
|
||||
return $ restrictInLinks cond $ roomRect 100 h 1 1 & rmPmnts .~
|
||||
[blockLine (V2 50 50) (V2 50 h)
|
||||
,sPS (V2 25 (h-25)) 0 $ PutCrit $ addArmour autoCrit
|
||||
,sPS (V2 75 (h-30)) 0 $ PutCrit explosiveBarrel
|
||||
|
||||
Reference in New Issue
Block a user