From 54a58178a155b0896c0f35440c1c5e88e21e2f60 Mon Sep 17 00:00:00 2001 From: toaster Date: Mon, 27 Feb 2023 19:55:11 +0000 Subject: [PATCH] Add Extras-related unlocks - When SECRET_ADDONS is locked - No Addons option on Extras submenu - No mid-game Addons in K_CanChangeRules - Forced onto CORE on Server Browser room selection page - Semi-related: If modifiedgame is true, force onto MODDED, even if you haven't unlocked it - TODO: Update UI to show you can't switch in a more elegant way - Hide Addons Options on Data Options submenu - When SECRET_EGGTV is locked - No Egg TV option on Extras submenu - Semi-related: Rename to Egg TV per team discussion --- src/deh_soc.c | 4 +++ src/k_menu.h | 1 + src/k_menudraw.c | 16 ++++++++-- src/m_cond.h | 2 ++ src/menus/extras-1.c | 46 ++++++++++++++++++++++++++--- src/menus/options-1.c | 3 ++ src/menus/play-online-room-select.c | 20 +++++++------ src/menus/transient/pause-game.c | 7 ++++- 8 files changed, 83 insertions(+), 16 deletions(-) diff --git a/src/deh_soc.c b/src/deh_soc.c index a4bd8dc77..f79cf63d7 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -2292,6 +2292,10 @@ void readunlockable(MYFILE *f, INT32 num) unlockables[num].type = SECRET_SPECIALATTACK; else if (fastcmp(word2, "ONLINE")) unlockables[num].type = SECRET_ONLINE; + else if (fastcmp(word2, "ADDONS")) + unlockables[num].type = SECRET_ADDONS; + else if (fastcmp(word2, "EGGTV")) + unlockables[num].type = SECRET_EGGTV; else if (fastcmp(word2, "SOUNDTEST")) unlockables[num].type = SECRET_SOUNDTEST; else if (fastcmp(word2, "ALTTITLE")) diff --git a/src/k_menu.h b/src/k_menu.h index 9145027ae..fccbf0675 100644 --- a/src/k_menu.h +++ b/src/k_menu.h @@ -781,6 +781,7 @@ extern struct mpmenu_s { // See M_OptSelectTick, it'll make more sense there. Sorry if this is a bit of a mess! UINT8 room; + boolean roomforced; tic_t ticker; UINT8 servernum; diff --git a/src/k_menudraw.c b/src/k_menudraw.c index 7f2fa0f7e..ff5becb1b 100644 --- a/src/k_menudraw.c +++ b/src/k_menudraw.c @@ -2775,8 +2775,12 @@ void M_DrawMPRoomSelect(void) // Draw buttons: - V_DrawFixedPatch(160<