Add missing file, workaround for placement positions bug

This commit is contained in:
2022-03-08 07:59:36 +00:00
parent 79b5241c32
commit 59e6f433ff
16 changed files with 67 additions and 86 deletions
+5 -3
View File
@@ -19,12 +19,10 @@ import Control.Monad.State
--import Control.Monad.Loops
import System.Random
import Data.Tree
-- TODO: partially combine a room tree into a room
glassLesson :: RandomGen g => State g (SubCompTree Room)
glassLesson = do
i <- takeOne [1,2,3]
corridors <- replicateM i $ PassDown <$> randomiseOutLinks corridor
corridors <- replicateM i $ PassDown <$> shuffleLinks corridor
return $ Node (PassDown botRoom)
[ singleUseNone $ door & rmConnectsTo .~ S.singleton (LabLink 0)
, uppers
@@ -58,3 +56,7 @@ glassLesson = do
, mntLS vShape (V2 180 200) (V3 160 180 50)
]
]
glassLessonRunPast :: RandomGen g => State g (SubCompTree Room)
glassLessonRunPast = f <$> glassLesson
where
f (Node r rs) = Node r $ (return $ UseLabel 0 $ door & rmConnectsTo .~ S.singleton (OnEdge West)) : rs