Add quiet laser sound
This commit is contained in:
+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