diff --git a/src/Dodge/Room/LasTurret.hs b/src/Dodge/Room/LasTurret.hs index 4683f6d54..7f49a3b55 100644 --- a/src/Dodge/Room/LasTurret.hs +++ b/src/Dodge/Room/LasTurret.hs @@ -145,27 +145,47 @@ lasCenSensEdge n = do lasCenRunClose :: (RandomGen g) => State g (MetaTree Room String) lasCenRunClose = do + npoly <- takeOne [5,6,7,8,9] + inwall <- takeOne obwalls + outwall <- takeOne obwalls thelight <- mntLightLnkCond $ rprBool $ const . isInLnk thelight1 <- mntLightLnkCond $ rprBool $ const . isOutLnk - r <- - roomNgon 8 250 + r <- shuffleLinks =<< + (roomNgon npoly 250 <&> rmPmnts - .~ [ putLasTurret 0.02 - , inlinkwall 70 (rectNSWE 10 (-10) (-10) 30) - , inlinkwall 125 (rectNSWE 55 (-55) (-10) 10) - , inlinkwall 180 (rectNSWE 10 (-10) (-30) 10) - , outlinkwall 70 (rectNSWE 10 (-10) (-30) 10) - , outlinkwall 125 (rectNSWE 55 (-55) (-10) 10) - , outlinkwall 180 (rectNSWE 10 (-10) (-10) 30) + .~ ( + fmap (uncurry inlinkwall) inwall <> + fmap (uncurry outlinkwall) outwall <> + [ putLasTurret 0.02 +-- , outlinkwall 70 (rectNSWE 10 (-10) (-30) 10) +-- , outlinkwall 125 (rectNSWE 55 (-55) (-10) 10) +-- , outlinkwall 180 (rectNSWE 10 (-10) (-10) 30) , thelight , thelight1 ] --- <&> rmLinks %~ setOutLinksByType (PolyEdge 7) --- <&> rmLinks %~ tail --- <&> rmLinks %~ setOutLinks (const False) - <&> rmPath %~ addNodesCrossingCirc 0 35 + ) + <&> rmPath %~ addNodesCrossingCirc 0 30 + <&> rmLinks %~ setInLinksByType (PolyEdge 0) + <&> rmLinks %~ setOutLinks (\rl -> or [PolyEdge i `S.member` _rlType rl | i <- [2..npoly-2]]) + ) rToOnward "lasCenRunClose" $ return $ cleatOnward r where + swall = [ (70, (rectNSWE 10 (-10) (-10) 30)) + , (125, (rectNSWE 55 (-55) (-10) 10)) + , (180, (rectNSWE 10 (-10) (-30) 10)) + ] + zwall = [ (70, (rectNSWE 10 (-10) (-30) 10)) + , (125, (rectNSWE 55 (-55) (-10) 10)) + , (180, (rectNSWE 10 (-10) (-10) 30)) + ] + iwall = [ (70, (rectNSWE 10 (-10) (-15) 20)) + , (180, (rectNSWE 10 (-10) (-30) (-5))) + ] + jwall = [ (70, (rectNSWE 10 (-10) (-20) 15)) + , (180, (rectNSWE 10 (-10) 5 30)) + ] + uwall = [ (180, (rectNSWE 10 (-10) (-20) 20)) ] + obwalls = [swall,zwall,iwall,jwall,uwall] linkwall f x = heightWallPS (resetPLUse $ rprBoolShift (const . f) (shiftInBy x <&> (,S.singleton UsedPosLow))) 30 diff --git a/src/Dodge/Room/Path.hs b/src/Dodge/Room/Path.hs index 8c9074218..32d4a04cb 100644 --- a/src/Dodge/Room/Path.hs +++ b/src/Dodge/Room/Path.hs @@ -50,7 +50,3 @@ addNodesCrossingCirc c r = g . foldMap f | (j:js) <- sortOn (\x -> argV (x - c)) $ S.toList is = S.fromList . zip js $ (tail js <> [j]) | otherwise = mempty --- | null is = mempty --- | otherwise = --- let (j:js) = sortOn (\x -> argV (x - c)) $ S.toList is --- in S.fromList . zip js $ (tail js <> [j])