added option to choose between OoT and any ocarina (#2944)

This commit is contained in:
Bytenex 2023-06-15 05:29:07 +02:00 committed by GitHub
parent f85b04336c
commit 279c40cb7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -208,7 +208,7 @@ void RegisterOcarinaTimeTravel() {
uint8_t hasOcarinaOfTime = (INV_CONTENT(ITEM_OCARINA_TIME) == ITEM_OCARINA_TIME);
// If TimeTravel + Player have the Ocarina of Time + Have Master Sword + is in proper range
// TODO: Once Swordless Adult is fixed: Remove the Master Sword check
if (CVarGetInteger("gTimeTravel", 0) && hasOcarinaOfTime && hasMasterSword &&
if (((CVarGetInteger("gTimeTravel", 0) == 1 && hasOcarinaOfTime) || CVarGetInteger("gTimeTravel", 0) == 2) && hasMasterSword &&
gPlayState->msgCtx.lastPlayedSong == OCARINA_SONG_TIME && !nearbyTimeBlockEmpty && !nearbyTimeBlock &&
!nearbyOcarinaSpot && !nearbyFrogs) {

View File

@ -89,6 +89,7 @@ std::string GetWindowButtonText(const char* text, bool menuOpen) {
"8 Hearts",
"OHKO"
};
static const char* timeTravelOptions[3] = { "Disabled", "Ocarina of Time", "Any Ocarina" };
extern "C" SaveContext gSaveContext;
@ -545,11 +546,12 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Nighttime Skulltulas will spawn during both day and night.");
UIWidgets::PaddedEnhancementCheckbox("Dampe Appears All Night", "gDampeAllNight", true, false);
UIWidgets::Tooltip("Makes Dampe appear anytime during the night, not just his usual working hours.");
UIWidgets::PaddedEnhancementCheckbox("Time Travel with the Song of Time", "gTimeTravel", true, false);
UIWidgets::PaddedText("Time Travel with the Song of Time", true, false);
UIWidgets::EnhancementCombobox("gTimeTravel", timeTravelOptions, 0);
UIWidgets::Tooltip("Allows Link to freely change age by playing the Song of Time.\n"
"Time Blocks can still be used properly.\n\n"
"Requirements:\n"
"- Obtained the Ocarina of Time\n"
"- Obtained the Ocarina of Time (depends on selection)\n"
"- Obtained the Song of Time\n"
"- Obtained the Master Sword\n"
"- Not within range of Time Block\n"