Add quiet laser sound
This commit is contained in:
@@ -97,7 +97,7 @@ lasTunnel = defaultRoom
|
||||
{ _rmPolys = polys
|
||||
, _rmBound = polys
|
||||
, _rmLinks = [(V2 20 190,1.5* pi),(V2 0 20,0.5* pi)]
|
||||
, _rmPmnts = [putLasTurret & plSpot .~ PS (V2 10 240) (1.5*pi)
|
||||
, _rmPmnts = [putLasTurret 0.005 & plSpot .~ PS (V2 10 240) (1.5*pi)
|
||||
, midWall (rectNSEW 65 40 0 25)
|
||||
, mntLS vShape (V2 50 10) (V3 40 20 50)
|
||||
]
|
||||
|
||||
@@ -49,8 +49,8 @@ critRoom = corridorWallN
|
||||
{ _rmRandPSs = [psRandRanges (15,25) (30,45) (pi,2*pi)]
|
||||
}
|
||||
|
||||
runPastRoom :: RandomGen g => State g (Tree (Either Room Room))
|
||||
runPastRoom = do
|
||||
runPastRoom :: RandomGen g => Int -> State g (Tree (Either Room Room))
|
||||
runPastRoom i = do
|
||||
h <- state $ randomR (200,400::Float)
|
||||
theedgetest <- takeOne [horEdgeTest (<1), horEdgeTest (>39)]
|
||||
thels <- roomCritLS
|
||||
@@ -66,10 +66,10 @@ runPastRoom = do
|
||||
critroom = linkcor & rmPmnts %~ ( plRRpt 0 randC1 :)
|
||||
aswitchroom = corridorWallN
|
||||
{_rmExtPmnt = Just $ putLitButOnPosExtTrig red useLnkRoomPos
|
||||
,_rmLabel = Just 0
|
||||
,_rmLabel = Just i
|
||||
,_rmPmnts = []
|
||||
}
|
||||
switchdoor = switchDoorRoom & rmTakeFrom ?~ 0
|
||||
switchdoor = switchDoorRoom & rmTakeFrom ?~ i
|
||||
n = length $ filter theedgetest $ _rmLinks cenroom
|
||||
controom = treeFromPost [Left switchdoor,Left linkcor] (Right door)
|
||||
critrooms :: [Tree (Either Room Room)]
|
||||
|
||||
+26
-19
@@ -52,44 +52,51 @@ minigunfakeout = do
|
||||
|
||||
centralLasTurret :: Room
|
||||
centralLasTurret = roomNgon 8 200 & rmPmnts .~
|
||||
[ putLasTurret
|
||||
, heightWall 30 (rectNSEW (-90) (-110) 10 (-10))
|
||||
, spanColLightI 0.5 98 (V2 0 (-5)) (V2 0 5)
|
||||
[ putLasTurret 0.02
|
||||
, heightWall 30 (rectNSEW (-90) (-110) 20 (-20))
|
||||
, mntLightLnkCond unusedLnkToPS
|
||||
--, spanColLightI 0.5 98 (V2 0 (-5)) (V2 0 5)
|
||||
, psPt atFstLnkOut $ PutForeground $ colorSH yellow $
|
||||
thinHighBar 0 (V2 20 (-1)) (V2 20 (-100))
|
||||
<> thinHighBar 0 (V2 0 (-100)) (V2 20 (-100))
|
||||
<> barPP 1.5 (V3 20 (-1) 0) (V3 20 (-1) 80)
|
||||
]
|
||||
& rmExtPmnt ?~
|
||||
extTrigLitPos (atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18 (-2)), a)))
|
||||
extTrigLitPos (atFstLnkOutShiftBy (\(p,a) -> (p +.+ rotateV a (V2 18.5 (-2.5)), a)))
|
||||
( \tp -> Just $ lightSensor (upf $ fromJust $ _plMID tp) (atFstLnkOutShiftInward 100)
|
||||
)
|
||||
where
|
||||
upf trid mc w | _mcSensor mc > 90 = w & triggers . ix trid .~ const True
|
||||
upf trid mc w | _mcSensor mc > 900 = w & triggers . ix trid .~ const True
|
||||
| otherwise = w
|
||||
|
||||
lasSensorTurretTest :: RandomGen g => Int -> State g (Tree (Either Room Room))
|
||||
lasSensorTurretTest n = do
|
||||
cenroom <- randomiseOutLinks $ centralLasTurret {_rmLabel = Just n}
|
||||
let doorroom = switchDoorRoom {_rmTakeFrom = Just n}
|
||||
return $ treeFromPost [Left cenroom,Left doorroom] (Right door)
|
||||
|
||||
rezThenLasTurret :: RandomGen g => State g (Tree (Either Room Room))
|
||||
rezThenLasTurret = do
|
||||
rbox <- rezBoxStart
|
||||
cenroom <- randomiseOutLinks $ centralLasTurret {_rmLabel = Just 0}
|
||||
let doorroom = switchDoorRoom {_rmTakeFrom = Just 0}
|
||||
contTree = treeFromPost [Left cenroom] (Right doorroom)
|
||||
contTree = treeFromPost [Left cenroom,Left doorroom] (Right door)
|
||||
return $ rbox `appendEitherTree` [contTree]
|
||||
|
||||
startRoom :: RandomGen g => State g (Tree (Either Room Room))
|
||||
startRoom = join $ takeOne
|
||||
[ rezThenLasTurret
|
||||
--,minigunfakeout
|
||||
--, rezBoxesWp
|
||||
--, rezBoxesThenWeaponRoom
|
||||
--, rezBoxThenWeaponRoom
|
||||
--, rezBoxesWpCrit
|
||||
--, runPastStart
|
||||
startRoom :: RandomGen g => Int -> State g (Tree (Either Room Room))
|
||||
startRoom i = join $ takeOne
|
||||
[ minigunfakeout
|
||||
, rezBoxesWp
|
||||
, rezBoxesThenWeaponRoom
|
||||
, rezBoxThenWeaponRoom
|
||||
, rezBoxesWpCrit
|
||||
, runPastStart i
|
||||
]
|
||||
|
||||
runPastStart :: RandomGen g => State g (Tree (Either Room Room))
|
||||
runPastStart = do
|
||||
runPastStart :: RandomGen g => Int -> State g (Tree (Either Room Room))
|
||||
runPastStart i = do
|
||||
s <- rezBoxStart
|
||||
rp <- runPastRoom
|
||||
rp <- runPastRoom i
|
||||
return $ s `appendEitherTree` [rp]
|
||||
|
||||
rezBoxStart :: RandomGen g => State g (Tree (Either Room Room))
|
||||
@@ -214,7 +221,7 @@ startRoom' = do
|
||||
, tankSquare (dim orange) 50 50
|
||||
, tankSquare (dim orange) 50 120
|
||||
, lightSensor (const id) (PS (V2 (0.8*w) (0.25*h)) 0)
|
||||
, putLasTurret & plSpot .~ PS (V2 (0.8*w) (0.8*h)) 0
|
||||
, putLasTurret 0.005 & plSpot .~ PS (V2 (0.8*w) (0.8*h)) 0
|
||||
, sps0 $ PutForeground $ colorSH orange $ pipePP 2 (V3 50 50 25) (V3 50 120 25)
|
||||
]
|
||||
thecol <- rezColor
|
||||
|
||||
Reference in New Issue
Block a user