Add log when generating layout

This commit is contained in:
2022-05-20 21:15:44 +01:00
parent 20d041fc59
commit da302aad0c
16 changed files with 155 additions and 94 deletions
+11 -6
View File
@@ -1,3 +1,4 @@
{-# LANGUAGE TupleSections #-}
--{-# OPTIONS_GHC -Wno-unused-imports #-}
{- | The tree of rooms that make up a level. -}
module Dodge.Floor
@@ -38,16 +39,18 @@ import System.Random
initialAnoTree :: Tree [Annotation]
initialAnoTree = padSucWithDoors $ treeFromTrunk
[[AnoApplyInt 0 startRoom]
, [SpecificRoom $ return . return . UseAll $ roomRectAutoLinks 400 400
, [SpecificRoom $ return (return . UseAll $ roomRectAutoLinks 400 400
& rmPmnts .++~ [spNoID anyUnusedSpot (PutCrit chaseCrit)
, spNoID anyUnusedSpot (PutCrit armourChaseCrit)
]
, TreeSubLabelling "chaseCrit+armourChaseCrit rectRoom" Nothing)
]
-- , [AnoApplyInt 100 healthTest]
, [SpecificRoom $ return . UseAll <$> tanksRoom [] []]
, [SpecificRoom ((return . UseAll <$> tanksRoom [] [])
<&> (, TreeSubLabelling "empty tanksRoom" Nothing))]
, [PassthroughLockKeyLists 2 lockRoomKeyItems itemRooms]
, [SpecificRoom randomChallenges]
, [AnoApplyInt' 1 lasSensorTurretTest "lasSensorTurretTest"]
, [AnoApplyInt 1 lasSensorTurretTest]
-- ,[SpecificRoom $ fmap singleUseAll roomCCrits]
-- ,[AirlockAno]
-- ,[Corridor]
@@ -88,11 +91,13 @@ initialAnoTree = padSucWithDoors $ treeFromTrunk
-- ,[Corridor]
-- ,[TreasureAno [addArmour autoCrit,addArmour autoCrit] [launcher]]
]
$ treeFromPost [[Corridor,SpecificRoom $ pure . UseAll <$> randomFourCornerRoom []]]
[SpecificRoom $ fmap (pure . UseAll) (telRoomLev 1)]
$ treeFromPost [[Corridor,SpecificRoom $ (pure . UseAll <$> randomFourCornerRoom [])
<&>(,TreeSubLabelling "randomFourCornerRoom" Nothing )]]
[SpecificRoom $ (fmap (pure . UseAll) (telRoomLev 1))
<&> (,TreeSubLabelling "telRoomLev" Nothing)]
{- | A test level tree. -}
initialRoomTree :: State StdGen (Tree (SubCompTree Room,String))
initialRoomTree :: State StdGen (Tree (LabSubCompTree Room))
initialRoomTree = mapM anoToRoomTree initialAnoTree
--initialRoomTree :: State StdGen (Tree Room)
--initialRoomTree = do