Add bounds to door rooms, tweak mounted lights

This commit is contained in:
2022-03-20 08:23:18 +00:00
parent 02adb0a915
commit e811e67ff9
8 changed files with 44 additions and 65 deletions
+10
View File
@@ -29,6 +29,16 @@ 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)
padSucWithDoors :: RandomGen g => Tree [Annotation g] -> Tree [Annotation g]
padSucWithDoors (Node x xs) = Node x (map (padWithAno [SpecificRoom thetree]) xs)
where
thetree = do
thecor <- shuffleLinks corridor
takeOne
[ return (UseAll door)
, treeFromPost [PassDown door, PassDown thecor] (UseAll door)
]
{- Add one to three corridors between each parent-child link of a tree of annotations. -}
randomPadCorridors :: RandomGen g => Tree [Annotation g] -> State g (Tree [Annotation g])
randomPadCorridors (Node x xs) = do