Add quiet laser sound
This commit is contained in:
@@ -21,7 +21,11 @@ addLock i t = do
|
||||
return $ addToTrunk newBefore [Node [Lock i] afterLock]
|
||||
{- | Add one corridor between each parent-child link of a tree of annotations. -}
|
||||
padWithCorridors :: Tree [Annotation g] -> Tree [Annotation g]
|
||||
padWithCorridors (Node x xs) = Node [Corridor] [Node x (map padWithCorridors xs)]
|
||||
padWithCorridors = padWithAno [Corridor]
|
||||
|
||||
padWithAno :: [Annotation g] -> Tree [Annotation g] -> Tree [Annotation g]
|
||||
padWithAno ano (Node x xs) = Node ano [Node x (map (padWithAno ano) xs)]
|
||||
|
||||
padSucWithCorridors :: Tree [Annotation g] -> Tree [Annotation g]
|
||||
padSucWithCorridors (Node x xs) = Node x (map padWithCorridors xs)
|
||||
|
||||
@@ -35,9 +39,11 @@ randomPadCorridors (Node x xs) = do
|
||||
roomThenCorridor :: RandomGen g => Room -> State g (Tree (Either Room Room))
|
||||
roomThenCorridor theRoom = fmap (\r -> Node (Left theRoom) [(pure . Right) r])
|
||||
(randomiseOutLinks corridor)
|
||||
|
||||
{- | Create a random room tree structure from a list of annotations. -}
|
||||
anoToRoomTree :: RandomGen g => [Annotation g] -> State g (Tree (Either Room Room))
|
||||
anoToRoomTree anos = case anos of
|
||||
[AnoApplyInt i f] -> f i
|
||||
[SetLabel i randrm] -> do
|
||||
rm <- randrm
|
||||
return . connectRoom $ rm & rmLabel ?~ i
|
||||
@@ -57,7 +63,6 @@ anoToRoomTree anos = case anos of
|
||||
blockedC <- longBlockedCorridor
|
||||
join $ takeOne $ return (appendEitherTree branchWP [blockedC]) : replicate 5 weaponRoom
|
||||
[EndRoom] -> fmap (pure . Right) (telRoomLev 1)
|
||||
[StartRoom] -> startRoom
|
||||
(SpecificRoom rt:_) -> rt
|
||||
(BossAno cr : _) -> do
|
||||
br <- bossRoom cr
|
||||
|
||||
Reference in New Issue
Block a user