Prevent important messages from being accidentally filtered.

This commit is contained in:
Marisa the Magician 2023-01-04 11:56:15 +01:00 committed by Christoph Oelckers
parent 79a4e4a0e3
commit 0e5c6e37b1
11 changed files with 13 additions and 13 deletions

View file

@ -683,7 +683,7 @@ void FSerializer::ReadObjects(bool hubtravel)
{ {
r->mObjects.Clamp(size); // close all inner objects. r->mObjects.Clamp(size); // close all inner objects.
// In case something in here throws an error, let's continue and deal with it later. // 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++; mErrors++;
} }
} }

View file

@ -1696,6 +1696,6 @@ CCMD(fs_dir)
auto fnid = fileSystem.GetResourceId(i); auto fnid = fileSystem.GetResourceId(i);
auto length = fileSystem.FileLength(i); auto length = fileSystem.FileLength(i);
bool hidden = fileSystem.FindFile(fn1) != 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)" : "");
} }
} }

View file

@ -925,7 +925,7 @@ void M_Init (void)
catch (CVMAbortException &err) catch (CVMAbortException &err)
{ {
err.MaybePrintMessage(); err.MaybePrintMessage();
Printf(PRINT_NONOTIFY, "%s", err.stacktrace.GetChars()); Printf(PRINT_NONOTIFY | PRINT_BOLD, "%s", err.stacktrace.GetChars());
I_FatalError("Failed to initialize menus"); I_FatalError("Failed to initialize menus");
} }
M_CreateMenus(); M_CreateMenus();

View file

@ -682,7 +682,7 @@ void CVMAbortException::MaybePrintMessage()
auto m = GetMessage(); auto m = GetMessage();
if (m != nullptr) if (m != nullptr)
{ {
Printf(PRINT_NONOTIFY, TEXTCOLOR_RED "%s\n", m); Printf(PRINT_NONOTIFY | PRINT_BOLD, TEXTCOLOR_RED "%s\n", m);
SetMessage(""); SetMessage("");
} }
} }

View file

@ -1234,7 +1234,7 @@ void D_DoomLoop ()
catch (CVMAbortException &error) catch (CVMAbortException &error)
{ {
error.MaybePrintMessage(); error.MaybePrintMessage();
Printf(PRINT_NONOTIFY, "%s", error.stacktrace.GetChars()); Printf(PRINT_NONOTIFY | PRINT_BOLD, "%s", error.stacktrace.GetChars());
D_ErrorCleanup(); D_ErrorCleanup();
} }
} }

View file

@ -1385,7 +1385,7 @@ void FLevelLocals::DoLoadLevel(const FString &nextmapname, int position, bool au
{ {
FString mapname = nextmapname; FString mapname = nextmapname;
mapname.ToUpper(); 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. // Set the sky map.

View file

@ -718,7 +718,7 @@ static void TerminalResponse (const char *str)
if (StatusBar != NULL) 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 // The message is positioned a bit above the menu choices, because
// merchants can tell you something like this but continue to show // merchants can tell you something like this but continue to show
// their dialogue screen. I think most other conversations use this // their dialogue screen. I think most other conversations use this

View file

@ -538,7 +538,7 @@ bool FThinkerList::DoDestroyThinkers()
{ {
Printf("VM exception in DestroyThinkers:\n"); Printf("VM exception in DestroyThinkers:\n");
exception.MaybePrintMessage(); 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. // forcibly delete this. Cleanup may be incomplete, though.
node->ObjectFlags |= OF_YesReallyDelete; node->ObjectFlags |= OF_YesReallyDelete;
delete node; delete node;
@ -546,7 +546,7 @@ bool FThinkerList::DoDestroyThinkers()
} }
catch (CRecoverableError &exception) 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. // forcibly delete this. Cleanup may be incomplete, though.
node->ObjectFlags |= OF_YesReallyDelete; node->ObjectFlags |= OF_YesReallyDelete;
delete node; delete node;

View file

@ -8770,7 +8770,7 @@ scriptwait:
if (type & HUDMSG_LOG) if (type & HUDMSG_LOG)
{ {
int consolecolor = color >= CR_BRICK && color < NUM_TEXT_COLORS && color != CR_UNTRANSLATED ? color + 'A' : '-'; 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);
} }
} }
} }

View file

@ -622,7 +622,7 @@ void P_GiveSecret(FLevelLocals *Level, AActor *actor, bool printmessage, bool pl
C_MidPrint(nullptr, GStrings["SECRETMESSAGE"]); C_MidPrint(nullptr, GStrings["SECRETMESSAGE"]);
if (showsecretsector && sectornum >= 0) 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); if (playsound) S_Sound (CHAN_AUTO, CHANF_UI, "misc/secret", 1, ATTN_NORM);

View file

@ -422,7 +422,7 @@ void player_t::SetLogText (const char *text)
if (mo && mo->CheckLocalView()) if (mo && mo->CheckLocalView())
{ {
// Print log text to console // 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);
} }
} }