From 112d0060d58dd2a107fed3c5454504f67128d88f Mon Sep 17 00:00:00 2001 From: Marisa the Magician Date: Wed, 4 Jan 2023 11:56:15 +0100 Subject: [PATCH 12/51] Prevent important messages from being accidentally filtered. --- src/common/engine/serializer.cpp | 2 +- src/common/filesystem/filesystem.cpp | 4 ++-- src/common/menu/menu.cpp | 2 +- src/common/scripting/vm/vmframe.cpp | 2 +- src/d_main.cpp | 2 +- src/g_level.cpp | 2 +- src/p_conversation.cpp | 2 +- src/playsim/dthinker.cpp | 4 ++-- src/playsim/p_acs.cpp | 2 +- src/playsim/p_spec.cpp | 2 +- src/playsim/p_user.cpp | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/common/engine/serializer.cpp b/src/common/engine/serializer.cpp index 808b0fedc..8c68b5a3b 100644 --- a/src/common/engine/serializer.cpp +++ b/src/common/engine/serializer.cpp @@ -683,7 +683,7 @@ void FSerializer::ReadObjects(bool hubtravel) { r->mObjects.Clamp(size); // close all inner objects. // In case something in here throws an error, let's continue and deal with it later. - Printf(PRINT_NONOTIFY, TEXTCOLOR_RED "'%s'\n while restoring %s\n", err.GetMessage(), obj ? obj->GetClass()->TypeName.GetChars() : "invalid object"); + Printf(PRINT_NONOTIFY | PRINT_BOLD, TEXTCOLOR_RED "'%s'\n while restoring %s\n", err.GetMessage(), obj ? obj->GetClass()->TypeName.GetChars() : "invalid object"); mErrors++; } } diff --git a/src/common/filesystem/filesystem.cpp b/src/common/filesystem/filesystem.cpp index 21acc4e2f..f18ad5138 100644 --- a/src/common/filesystem/filesystem.cpp +++ b/src/common/filesystem/filesystem.cpp @@ -1696,6 +1696,6 @@ CCMD(fs_dir) auto fnid = fileSystem.GetResourceId(i); auto length = fileSystem.FileLength(i); bool hidden = fileSystem.FindFile(fn1) != i; - Printf(PRINT_NONOTIFY, "%s%-64s %-15s (%5d) %10d %s %s\n", hidden ? TEXTCOLOR_RED : TEXTCOLOR_UNTRANSLATED, fn1, fns, fnid, length, container, hidden ? "(h)" : ""); + Printf(PRINT_HIGH | PRINT_NONOTIFY, "%s%-64s %-15s (%5d) %10d %s %s\n", hidden ? TEXTCOLOR_RED : TEXTCOLOR_UNTRANSLATED, fn1, fns, fnid, length, container, hidden ? "(h)" : ""); } -} \ No newline at end of file +} diff --git a/src/common/menu/menu.cpp b/src/common/menu/menu.cpp index deee74597..c5890080c 100644 --- a/src/common/menu/menu.cpp +++ b/src/common/menu/menu.cpp @@ -925,7 +925,7 @@ void M_Init (void) catch (CVMAbortException &err) { err.MaybePrintMessage(); - Printf(PRINT_NONOTIFY, "%s", err.stacktrace.GetChars()); + Printf(PRINT_NONOTIFY | PRINT_BOLD, "%s", err.stacktrace.GetChars()); I_FatalError("Failed to initialize menus"); } M_CreateMenus(); diff --git a/src/common/scripting/vm/vmframe.cpp b/src/common/scripting/vm/vmframe.cpp index 69b47dfd5..a2c972820 100644 --- a/src/common/scripting/vm/vmframe.cpp +++ b/src/common/scripting/vm/vmframe.cpp @@ -682,7 +682,7 @@ void CVMAbortException::MaybePrintMessage() auto m = GetMessage(); if (m != nullptr) { - Printf(PRINT_NONOTIFY, TEXTCOLOR_RED "%s\n", m); + Printf(PRINT_NONOTIFY | PRINT_BOLD, TEXTCOLOR_RED "%s\n", m); SetMessage(""); } } diff --git a/src/d_main.cpp b/src/d_main.cpp index 12b3fb9ff..5bf8e8928 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1237,7 +1237,7 @@ void D_DoomLoop () catch (CVMAbortException &error) { error.MaybePrintMessage(); - Printf(PRINT_NONOTIFY, "%s", error.stacktrace.GetChars()); + Printf(PRINT_NONOTIFY | PRINT_BOLD, "%s", error.stacktrace.GetChars()); D_ErrorCleanup(); } } diff --git a/src/g_level.cpp b/src/g_level.cpp index 8aa011506..2fbba84f0 100644 --- a/src/g_level.cpp +++ b/src/g_level.cpp @@ -1385,7 +1385,7 @@ void FLevelLocals::DoLoadLevel(const FString &nextmapname, int position, bool au { FString mapname = nextmapname; mapname.ToUpper(); - Printf(PRINT_NONOTIFY, "\n" TEXTCOLOR_NORMAL "%s\n\n" TEXTCOLOR_BOLD "%s - %s\n\n", console_bar, mapname.GetChars(), LevelName.GetChars()); + Printf(PRINT_HIGH | PRINT_NONOTIFY, "\n" TEXTCOLOR_NORMAL "%s\n\n" TEXTCOLOR_BOLD "%s - %s\n\n", console_bar, mapname.GetChars(), LevelName.GetChars()); } // Set the sky map. diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 13f54e9ab..47d9a896f 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -718,7 +718,7 @@ static void TerminalResponse (const char *str) if (StatusBar != NULL) { - Printf(PRINT_NONOTIFY, "%s\n", str); + Printf(PRINT_HIGH | PRINT_NONOTIFY, "%s\n", str); // The message is positioned a bit above the menu choices, because // merchants can tell you something like this but continue to show // their dialogue screen. I think most other conversations use this diff --git a/src/playsim/dthinker.cpp b/src/playsim/dthinker.cpp index 37e135230..86ef7918c 100644 --- a/src/playsim/dthinker.cpp +++ b/src/playsim/dthinker.cpp @@ -538,7 +538,7 @@ bool FThinkerList::DoDestroyThinkers() { Printf("VM exception in DestroyThinkers:\n"); exception.MaybePrintMessage(); - Printf(PRINT_NONOTIFY, "%s", exception.stacktrace.GetChars()); + Printf(PRINT_NONOTIFY | PRINT_BOLD, "%s", exception.stacktrace.GetChars()); // forcibly delete this. Cleanup may be incomplete, though. node->ObjectFlags |= OF_YesReallyDelete; delete node; @@ -546,7 +546,7 @@ bool FThinkerList::DoDestroyThinkers() } catch (CRecoverableError &exception) { - Printf(PRINT_NONOTIFY, "Error in DestroyThinkers: %s\n", exception.GetMessage()); + Printf(PRINT_NONOTIFY | PRINT_BOLD, "Error in DestroyThinkers: %s\n", exception.GetMessage()); // forcibly delete this. Cleanup may be incomplete, though. node->ObjectFlags |= OF_YesReallyDelete; delete node; diff --git a/src/playsim/p_acs.cpp b/src/playsim/p_acs.cpp index 01def4758..9ee22264c 100644 --- a/src/playsim/p_acs.cpp +++ b/src/playsim/p_acs.cpp @@ -8769,7 +8769,7 @@ scriptwait: if (type & HUDMSG_LOG) { int consolecolor = color >= CR_BRICK && color < NUM_TEXT_COLORS && color != CR_UNTRANSLATED ? color + 'A' : '-'; - Printf(PRINT_NONOTIFY, "\n" TEXTCOLOR_ESCAPESTR "%c%s\n%s\n%s\n", consolecolor, console_bar, work.GetChars(), console_bar); + Printf(PRINT_HIGH | PRINT_NONOTIFY, "\n" TEXTCOLOR_ESCAPESTR "%c%s\n%s\n%s\n", consolecolor, console_bar, work.GetChars(), console_bar); } } } diff --git a/src/playsim/p_spec.cpp b/src/playsim/p_spec.cpp index ab682f171..52760d935 100644 --- a/src/playsim/p_spec.cpp +++ b/src/playsim/p_spec.cpp @@ -622,7 +622,7 @@ void P_GiveSecret(FLevelLocals *Level, AActor *actor, bool printmessage, bool pl C_MidPrint(nullptr, GStrings["SECRETMESSAGE"]); if (showsecretsector && sectornum >= 0) { - Printf(PRINT_NONOTIFY, "Secret found in sector %d\n", sectornum); + Printf(PRINT_HIGH | PRINT_NONOTIFY, "Secret found in sector %d\n", sectornum); } } if (playsound) S_Sound (CHAN_AUTO, CHANF_UI, "misc/secret", 1, ATTN_NORM); diff --git a/src/playsim/p_user.cpp b/src/playsim/p_user.cpp index 0fa33a90e..0bc45d1f4 100644 --- a/src/playsim/p_user.cpp +++ b/src/playsim/p_user.cpp @@ -422,7 +422,7 @@ void player_t::SetLogText (const char *text) if (mo && mo->CheckLocalView()) { // Print log text to console - Printf(PRINT_NONOTIFY, TEXTCOLOR_GOLD "%s\n", LogText[0] == '$' ? GStrings(text + 1) : text); + Printf(PRINT_HIGH | PRINT_NONOTIFY, TEXTCOLOR_GOLD "%s\n", LogText[0] == '$' ? GStrings(text + 1) : text); } } -- 2.39.3