From cb7a579b16a0082f9041a438a8b852af9b0cc7e6 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Thu, 11 Apr 2024 17:43:59 -0700 Subject: [PATCH] Fury Bike --- src/g_game.c | 1 + src/g_game.h | 2 ++ src/m_cond.c | 5 +++++ src/m_pw.cpp | 20 +++++++++++++------- src/menus/extras-challenges.c | 2 +- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 56b3538a9..f687cd155 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -147,6 +147,7 @@ boolean modifiedgame = false; // Set if homebrew PWAD stuff has been added. boolean majormods = false; // Set if Lua/Gameplay SOC/replacement map has been added. boolean savemoddata = false; boolean usedCheats = false; // Set when a "cheats on" is ever used. +boolean usedTourney = false; // Entered the "Tournament Mode" cheat. UINT8 paused; UINT8 modeattacking = ATTACKING_NONE; boolean imcontinuing = false; diff --git a/src/g_game.h b/src/g_game.h index 16676cf33..335294950 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -84,6 +84,8 @@ extern tic_t timeinmap; // Ticker for time spent in level (used for levelcard di extern INT32 pausedelay; extern boolean pausebreakkey; +extern boolean usedTourney; + extern boolean promptactive; extern consvar_t cv_tutorialprompt; diff --git a/src/m_cond.c b/src/m_cond.c index f4d5422a6..5f7ee7af0 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -2972,6 +2972,11 @@ char *M_BuildConditionSetString(UINT16 unlockid) } } + if (usedTourney && unlockables[unlockid].conditionset == 55 && gamedata->unlocked[unlockid] == false) + { + strcpy(message, "Power shrouds this challenge in darkness... (Return here without Tournament Mode!)\0"); + } + // Finally, do a clean wordwrap! return V_ScaledWordWrap( DESCRIPTIONWIDTH << FRACBITS, diff --git a/src/m_pw.cpp b/src/m_pw.cpp index 5583f7987..602b42fd5 100644 --- a/src/m_pw.cpp +++ b/src/m_pw.cpp @@ -110,6 +110,8 @@ void f_tournament() { if (!unlockables[i].conditionset) continue; + if (unlockables[i].conditionset == 55) + continue; if (gamedata->unlocked[i]) continue; @@ -146,10 +148,12 @@ void f_tournament() S_StartSound(0, sfx_kc42); text = M_GetText( - "All challenges temporarily unlocked.\n" + "Unlocked\x83 almost\x80 everything.\n" "Saving is disabled - the game will\n" "return to normal on next launch.\n" ); + + usedTourney = true; } else { @@ -158,18 +162,20 @@ void f_tournament() if (usedCheats) { text = M_GetText( - "This is the correct password, but\n" - "you already have every challenge\n" - "unlocked, so nothing has changed.\n" + "This is the correct password,\n" + "but there's nothing to unlock\n" + "right now -- nothing has changed.\n" ); } else { text = M_GetText( "This is the correct password, but\n" - "you already have every challenge\n" - "unlocked, so saving is still allowed!\n" + "there's nothing to unlock right\n" + "now, so saving is still allowed!\n" ); + + usedTourney = true; } } @@ -308,7 +314,7 @@ try_password_e M_TryPassword(const char *password, boolean conditions) add_job(pw.hash_.data(), &pw); // Only consider challenges passwords as needed. - if (conditions) + if (conditions && !usedTourney) iter_conditions([&](condition_t* cn) { add_job((const UINT8*)cn->stringvar, cn); }); try_password_e return_code = M_PW_INVALID; diff --git a/src/menus/extras-challenges.c b/src/menus/extras-challenges.c index dc488f953..b6d48f296 100644 --- a/src/menus/extras-challenges.c +++ b/src/menus/extras-challenges.c @@ -847,7 +847,7 @@ boolean M_ChallengesInputs(INT32 ch) { M_ChallengesTutorial(CCTUTORIAL_MAJORSKIP); } - else if (M_CanKeyHiliTile()) + else if (M_CanKeyHiliTile() && !usedTourney) { challengesmenu.chaokeyhold = 1; }