Re-quiet turn 0 book reading (joshgelbard)
authoradvil <rawlins@gmail.com>
Wed, 29 Jul 2020 23:54:14 +0000 (19:54 -0400)
committeradvil <rawlins@gmail.com>
Wed, 29 Jul 2020 23:54:14 +0000 (19:54 -0400)
This was accidentally made non-quiet again in b274e4624. This new
version uses the power of RAII to avoid adding back a bool or
conditioning on turn.

Resolves #1503

crawl-ref/source/ng-setup.cc

index d3fab93..413adcf 100644 (file)
@@ -14,6 +14,7 @@
 #include "items.h"
 #include "item-use.h"
 #include "jobs.h"
+#include "message.h"
 #include "mutation.h"
 #include "ng-init.h"
 #include "ng-wanderer.h"
@@ -478,8 +479,11 @@ static void _setup_generic(const newgame_def& ng,
 
     _give_basic_knowledge();
 
-    // Must be after _give_basic_knowledge
-    add_held_books_to_library();
+    {
+        msg::suppress quiet;
+        // Must be after _give_basic_knowledge
+        add_held_books_to_library();
+    }
 
     if (you.char_class == JOB_WANDERER)
         memorise_wanderer_spell();