From 2ee5aef3fab5fef7d5a616bccdda09714fe05ca5 Mon Sep 17 00:00:00 2001 From: NyakoFox Date: Tue, 29 Apr 2025 21:14:06 -0300 Subject: [PATCH] Fix the campaign trinket count missing from stats PR #1226 tweaks both the crew and the stats screens. When there's no trinkets in the level, it removes the trinket count from the STATS screen in the menu. This, however, is missing a `custommode` check, meaning that the main game is ALSO missing the trinket count. This PR fixes that oversight. --- desktop_version/src/Render.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index c3c1d7c0..428172cb 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -3198,9 +3198,12 @@ void maprender(void) } /* Stats. */ - int deaths_pos = (cl.numtrinkets() > 0) ? 102 : 72; - int time_pos = (cl.numtrinkets() > 0) ? 152 : 132; - if (cl.numtrinkets() > 0) + + // Always show trinkets if you're in the main game, otherwise only show them if any exist in the level + bool show_trinkets = map.custommode ? (cl.numtrinkets() > 0) : true; + int deaths_pos = show_trinkets ? 102 : 72; + int time_pos = show_trinkets ? 152 : 132; + if (show_trinkets) { font::print(PR_CEN | FLIP_PR_CJK_HIGH, -1, FLIP(52, 8), loc::gettext("[Trinkets found]"), 196, 196, 255 - help.glow); char buffer[SCREEN_WIDTH_CHARS + 1];