about summary refs log tree commit diff
path: root/users/grfn/xanthous/src/Xanthous/Generators/Level.hs
diff options
context:
space:
mode:
Diffstat (limited to 'users/grfn/xanthous/src/Xanthous/Generators/Level.hs')
-rw-r--r--users/grfn/xanthous/src/Xanthous/Generators/Level.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/users/grfn/xanthous/src/Xanthous/Generators/Level.hs b/users/grfn/xanthous/src/Xanthous/Generators/Level.hs
index 81f21f55ff00..ac97159f422c 100644
--- a/users/grfn/xanthous/src/Xanthous/Generators/Level.hs
+++ b/users/grfn/xanthous/src/Xanthous/Generators/Level.hs
@@ -85,7 +85,7 @@ parseGeneratorInput = Opt.subparser
     generatorCommand sgen name desc parseParams =
       Opt.command name
         (Opt.info
-          (GeneratorInput <$> pure sgen <*> parseParams)
+          (GeneratorInput sgen <$> parseParams)
           (Opt.progDesc desc)
         )
 
@@ -132,8 +132,9 @@ generateLevel
   => SGenerator gen
   -> Params gen
   -> Dimensions
+  -> Word -- ^ Level number, starting at 0
   -> m Level
-generateLevel gen ps dims = do
+generateLevel gen ps dims num = do
   rand <- mkStdGen <$> getRandom
   let cells = generate gen ps dims rand
       _levelWalls = cellsToWalls cells
@@ -146,7 +147,10 @@ generateLevel gen ps dims = do
   let upStaircase = _EntityMap # [(_levelCharacterPosition, UpStaircase)]
   downStaircase <- placeDownStaircase cells
   let _levelStaircases = upStaircase <> downStaircase
-  _levelTutorialMessage <- tutorialMessage cells _levelCharacterPosition
+  _levelTutorialMessage <-
+    if num == 0
+    then tutorialMessage cells _levelCharacterPosition
+    else pure mempty
   pure Level {..}
 
 levelToEntityMap :: Level -> EntityMap SomeEntity