Fix bug not adding last positioned room to list

This commit is contained in:
2021-11-23 12:50:15 +00:00
parent 05bb1961c0
commit f51a6a7216
6 changed files with 33 additions and 21 deletions
+8 -7
View File
@@ -36,7 +36,7 @@ initialAnoTree :: RandomGen g => Tree [Annotation g]
initialAnoTree = padSucWithCorridors $ treeFromTrunk
[[AnoApplyInt 0 startRoom]
, [PassthroughLockKeyLists 2 lockRoomKeyItems itemRooms]
--, [AnoApplyInt 1 lasSensorTurretTest]
-- , [AnoApplyInt 1 lasSensorTurretTest]
-- ,[ChainAnos
-- [[SetLabel 0 $ return $ roomRectAutoLinks 200 200
-- & rmExtPmnt ?~ triggerSwitchSPicLight (drawSwitchWire red red)
@@ -47,12 +47,12 @@ initialAnoTree = padSucWithCorridors $ treeFromTrunk
-- ]
-- ]
-- ,[SpecificRoom $ return $ connectRoom lasTunnel ]
,[SpecificRoom $ fmap singleUseAll slowDoorRoom ]
,[Corridor]
,[Corridor]
,[SpecificRoom $ fmap singleUseAll roomCCrits]
,[AirlockAno]
,[Corridor]
-- ,[SpecificRoom $ fmap singleUseAll slowDoorRoom ]
-- ,[Corridor]
-- ,[Corridor]
-- ,[SpecificRoom $ fmap singleUseAll roomCCrits]
-- ,[AirlockAno]
-- ,[Corridor]
------ ,[SpecificRoom roomCCrits]
------ ,[Corridor]
------ ,[SpecificRoom . pure . pure . UseAll $ roomGlassOctogon 400
@@ -113,6 +113,7 @@ layoutLevelFromSeed i seed = do
++ " attempt(s), Successful generation of level with seed "
++ show seed
--return (fmap setLastLinkToUsed rs)
putStrLn $ show (Prelude.length rs) ++ " rooms in total"
return rs
Nothing -> do
putStr $ "Level generation with seed " ++ show seed ++ " failed: "