Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Receive oceanside spider house wallet reward on any day #861

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mm/2s2h/BenGui/BenMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,11 @@ void DrawEnhancementsMenu() {
"swords. It may still steal other items." })) {
RegisterDisableTakkuriSteal();
}

UIWidgets::CVarCheckbox(
"Receive Oceanside Spider House Wallet Reward Any Day", "gEnhancements.Cheats.OceansideWalletAnyDay",
{ .tooltip = "The wallet reward for clearing the oceanside spider house can be received on any day." });

ImGui::EndMenu();
}

Expand Down
5 changes: 4 additions & 1 deletion mm/2s2h/BenGui/SearchableMenuItems.h
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,10 @@ void AddEnhancements() {
"Prevents the Takkuri from stealing key items like bottles and swords. It may still steal other items.",
WIDGET_CVAR_CHECKBOX,
{},
[](widgetInfo& info) { RegisterDisableTakkuriSteal(); } } } } });
[](widgetInfo& info) { RegisterDisableTakkuriSteal(); } },
{ "Receive Oceanside Spider House Wallet Reward Any Day", "gEnhancements.Cheats.OceansideWalletAnyDay",
"The wallet reward for clearing the oceanside spider house can be received on any day.",
WIDGET_CVAR_CHECKBOX } } } });
enhancementsSidebar.push_back({ "HUD Editor",
1,
{ // HUD Editor
Expand Down
52 changes: 26 additions & 26 deletions mm/src/overlays/actors/ovl_En_Sth/z_en_sth.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,34 +369,34 @@ void EnSth_HandleOceansideSpiderHouseConversation(EnSth* this, PlayState* play)
// This flag prevents multiple rewards, switching to secondary dialogue after
SET_WEEKEVENTREG(WEEKEVENTREG_OCEANSIDE_SPIDER_HOUSE_COLLECTED_REWARD);

switch (day) {
case 0: // first day
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_OCEANSIDE_WALLET_UPGRADE)) {
if (!CHECK_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_OCEANSIDE_WALLET_UPGRADE) &&
(day == 0 || CVarGetInteger("gEnhancements.Cheats.OceansideWalletAnyDay", 0))) {
// This flag prevents getting two wallets from the same place.
// Instead, getting a rupee award below.
SET_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_OCEANSIDE_WALLET_UPGRADE);
switch (CUR_UPG_VALUE(UPG_WALLET)) {
case 0:
STH_GI_ID(&this->actor) = GI_WALLET_ADULT;
break;

case 1:
STH_GI_ID(&this->actor) = GI_WALLET_GIANT;
break;
}
} else {
switch (day) {
case 0: // first day
STH_GI_ID(&this->actor) = GI_RUPEE_SILVER;
} else {
// This flag prevents getting two wallets from the same place.
// Instead, getting silver rupee above.
SET_WEEKEVENTREG(WEEKEVENTREG_RECEIVED_OCEANSIDE_WALLET_UPGRADE);
switch (CUR_UPG_VALUE(UPG_WALLET)) {
case 0:
STH_GI_ID(&this->actor) = GI_WALLET_ADULT;
break;

case 1:
STH_GI_ID(&this->actor) = GI_WALLET_GIANT;
break;
}
}
break;

case 1: // second day
STH_GI_ID(&this->actor) = GI_RUPEE_PURPLE;
break;

default: // final day
STH_GI_ID(&this->actor) = GI_RUPEE_RED;
break;
break;
case 1: // second day
STH_GI_ID(&this->actor) = GI_RUPEE_PURPLE;
break;
default: // final day
STH_GI_ID(&this->actor) = GI_RUPEE_RED;
break;
}
}

Message_CloseTextbox(play);
this->actionFunc = EnSth_GiveOceansideSpiderHouseReward;
EnSth_GiveOceansideSpiderHouseReward(this, play);
Expand Down
Loading