mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 06:13:45 -07:00
Roll back "key" settings to just closed/open, finish rando logic
This commit is contained in:
parent
1f93a2f596
commit
01dd468ab6
6 changed files with 32 additions and 33 deletions
|
@ -31,7 +31,7 @@ void RegionTable_Init_ZorasFountain() {
|
||||||
//child can break the brown rock without lifting the silver rock and it stays gone for adult, but it's not intuitive and there's no reasonable case where it matters.
|
//child can break the brown rock without lifting the silver rock and it stays gone for adult, but it's not intuitive and there's no reasonable case where it matters.
|
||||||
Entrance(RR_ZF_HIDDEN_CAVE, []{return logic->CanUse(RG_SILVER_GAUNTLETS) && logic->BlastOrSmash();}),
|
Entrance(RR_ZF_HIDDEN_CAVE, []{return logic->CanUse(RG_SILVER_GAUNTLETS) && logic->BlastOrSmash();}),
|
||||||
Entrance(RR_ZF_ROCK, []{return logic->IsAdult && logic->CanUse(RG_SCARECROW);}),
|
Entrance(RR_ZF_ROCK, []{return logic->IsAdult && logic->CanUse(RG_SCARECROW);}),
|
||||||
Entrance(RR_JABU_JABUS_BELLY_ENTRYWAY, []{return (logic->IsChild && logic->CanUse(RG_BOTTLE_WITH_FISH));}),
|
Entrance(RR_JABU_JABUS_BELLY_ENTRYWAY, []{return logic->IsChild && (ctx->GetOption(RSK_JABU_OPEN).Is(RO_JABU_OPEN) || logic->CanUse(RG_BOTTLE_WITH_FISH));}),
|
||||||
Entrance(RR_ZF_GREAT_FAIRY_FOUNTAIN, []{return logic->HasExplosives() || (ctx->GetTrickOption(RT_ZF_GREAT_FAIRY_WITHOUT_EXPLOSIVES) && logic->CanUse(RG_MEGATON_HAMMER) && logic->CanUse(RG_SILVER_GAUNTLETS));}),
|
Entrance(RR_ZF_GREAT_FAIRY_FOUNTAIN, []{return logic->HasExplosives() || (ctx->GetTrickOption(RT_ZF_GREAT_FAIRY_WITHOUT_EXPLOSIVES) && logic->CanUse(RG_MEGATON_HAMMER) && logic->CanUse(RG_SILVER_GAUNTLETS));}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -42,13 +42,8 @@ void Settings::CreateOptionDescriptions() {
|
||||||
"\n"
|
"\n"
|
||||||
"Open - Sleeping Waterfall is always open. "
|
"Open - Sleeping Waterfall is always open. "
|
||||||
"Link may always enter Zora's Domain.";
|
"Link may always enter Zora's Domain.";
|
||||||
mOptionDescriptions[RSK_JABU_JABU_KEY] =
|
mOptionDescriptions[RSK_JABU_OPEN] = "Closed - A fish is required to open Jabu-Jabu's mouth.\n\n"
|
||||||
"Chooses the requirement to enter Jabu-Jabu's Belly.\n\n"
|
"Open - Jabu-Jabu's mouth opens without the need for a fish.";
|
||||||
"Fish - Feed Jabu-Jabu a fish (the vanilla option).\n"
|
|
||||||
"Any Bottled Item - Offer Jabu-Jabu a random bottled item (e.g. a Fairy).\n"
|
|
||||||
"Any Collectible - Offer Jabu-Jabu a random collectible item (e.g. a bomb or a stick).\n"
|
|
||||||
"Any Song - Play Jabu-Jabu a random song.\n"
|
|
||||||
"Nothing - Link can enter Jabu-Jabu's Belly immediately.";
|
|
||||||
mOptionDescriptions[RSK_LOCK_OVERWORLD_DOORS] =
|
mOptionDescriptions[RSK_LOCK_OVERWORLD_DOORS] =
|
||||||
"Add locks to all wooden overworld doors, requiring specific small keys to open them";
|
"Add locks to all wooden overworld doors, requiring specific small keys to open them";
|
||||||
mOptionDescriptions[RSK_STARTING_AGE] =
|
mOptionDescriptions[RSK_STARTING_AGE] =
|
||||||
|
|
|
@ -5689,7 +5689,7 @@ typedef enum {
|
||||||
RSK_DOOR_OF_TIME,
|
RSK_DOOR_OF_TIME,
|
||||||
RSK_ZORAS_FOUNTAIN,
|
RSK_ZORAS_FOUNTAIN,
|
||||||
RSK_SLEEPING_WATERFALL,
|
RSK_SLEEPING_WATERFALL,
|
||||||
RSK_JABU_JABU_KEY,
|
RSK_JABU_OPEN,
|
||||||
RSK_STARTING_AGE,
|
RSK_STARTING_AGE,
|
||||||
RSK_SELECTED_STARTING_AGE,
|
RSK_SELECTED_STARTING_AGE,
|
||||||
RSK_GERUDO_FORTRESS,
|
RSK_GERUDO_FORTRESS,
|
||||||
|
@ -5940,14 +5940,11 @@ typedef enum {
|
||||||
RO_WATERFALL_OPEN,
|
RO_WATERFALL_OPEN,
|
||||||
} RandoOptionSleepingWaterfall;
|
} RandoOptionSleepingWaterfall;
|
||||||
|
|
||||||
// Jabu-Jabu Key settings (fish, bottled item, any item, Ocarina song, none)
|
// Jabu-Jabu settings (closed, open)
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RO_JABU_KEY_FISH,
|
RO_JABU_CLOSED,
|
||||||
RO_JABU_KEY_BOTTLED_ITEM,
|
RO_JABU_OPEN,
|
||||||
RO_JABU_KEY_ANY_ITEM,
|
} RandoOptionJabu;
|
||||||
RO_JABU_KEY_OCARINA_SONG,
|
|
||||||
RO_JABU_KEY_NONE,
|
|
||||||
} RandoOptionJabuKey;
|
|
||||||
|
|
||||||
// Starting Age settings (child, adult, random)
|
// Starting Age settings (child, adult, random)
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -120,7 +120,7 @@ void Settings::CreateOptions() {
|
||||||
OPT_U8(RSK_DOOR_OF_TIME, "Door of Time", {"Closed", "Song only", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("DoorOfTime"), mOptionDescriptions[RSK_DOOR_OF_TIME], WidgetType::Combobox);
|
OPT_U8(RSK_DOOR_OF_TIME, "Door of Time", {"Closed", "Song only", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("DoorOfTime"), mOptionDescriptions[RSK_DOOR_OF_TIME], WidgetType::Combobox);
|
||||||
OPT_U8(RSK_ZORAS_FOUNTAIN, "Zora's Fountain", {"Closed", "Closed as child", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ZorasFountain"), mOptionDescriptions[RSK_ZORAS_FOUNTAIN]);
|
OPT_U8(RSK_ZORAS_FOUNTAIN, "Zora's Fountain", {"Closed", "Closed as child", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("ZorasFountain"), mOptionDescriptions[RSK_ZORAS_FOUNTAIN]);
|
||||||
OPT_U8(RSK_SLEEPING_WATERFALL, "Sleeping Waterfall", {"Closed", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SleepingWaterfall"), mOptionDescriptions[RSK_SLEEPING_WATERFALL]);
|
OPT_U8(RSK_SLEEPING_WATERFALL, "Sleeping Waterfall", {"Closed", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("SleepingWaterfall"), mOptionDescriptions[RSK_SLEEPING_WATERFALL]);
|
||||||
OPT_U8(RSK_JABU_JABU_KEY, "Feeding Jabu-Jabu", {"Fish", "Any Bottled Item", "Any Collectible", "Any Song", "Nothing"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("JabuJabuKey"), mOptionDescriptions[RSK_JABU_JABU_KEY]);
|
OPT_U8(RSK_JABU_OPEN, "Jabu-Jabu", {"Closed", "Open"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("JabuJabu"), mOptionDescriptions[RSK_JABU_OPEN]);
|
||||||
OPT_BOOL(RSK_LOCK_OVERWORLD_DOORS, "Lock Overworld Doors", CVAR_RANDOMIZER_SETTING("LockOverworldDoors"), mOptionDescriptions[RSK_LOCK_OVERWORLD_DOORS]);
|
OPT_BOOL(RSK_LOCK_OVERWORLD_DOORS, "Lock Overworld Doors", CVAR_RANDOMIZER_SETTING("LockOverworldDoors"), mOptionDescriptions[RSK_LOCK_OVERWORLD_DOORS]);
|
||||||
OPT_U8(RSK_GERUDO_FORTRESS, "Fortress Carpenters", {"Normal", "Fast", "Free"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("FortressCarpenters"), mOptionDescriptions[RSK_GERUDO_FORTRESS]);
|
OPT_U8(RSK_GERUDO_FORTRESS, "Fortress Carpenters", {"Normal", "Fast", "Free"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("FortressCarpenters"), mOptionDescriptions[RSK_GERUDO_FORTRESS]);
|
||||||
OPT_U8(RSK_RAINBOW_BRIDGE, "Rainbow Bridge", {"Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens", "Greg"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("RainbowBridge"), mOptionDescriptions[RSK_RAINBOW_BRIDGE], WidgetType::Combobox, RO_BRIDGE_VANILLA, false, IMFLAG_NONE);
|
OPT_U8(RSK_RAINBOW_BRIDGE, "Rainbow Bridge", {"Vanilla", "Always open", "Stones", "Medallions", "Dungeon rewards", "Dungeons", "Tokens", "Greg"}, OptionCategory::Setting, CVAR_RANDOMIZER_SETTING("RainbowBridge"), mOptionDescriptions[RSK_RAINBOW_BRIDGE], WidgetType::Combobox, RO_BRIDGE_VANILLA, false, IMFLAG_NONE);
|
||||||
|
@ -1152,7 +1152,7 @@ void Settings::CreateOptions() {
|
||||||
&mOptions[RSK_DOOR_OF_TIME],
|
&mOptions[RSK_DOOR_OF_TIME],
|
||||||
&mOptions[RSK_ZORAS_FOUNTAIN],
|
&mOptions[RSK_ZORAS_FOUNTAIN],
|
||||||
&mOptions[RSK_SLEEPING_WATERFALL],
|
&mOptions[RSK_SLEEPING_WATERFALL],
|
||||||
&mOptions[RSK_JABU_JABU_KEY],
|
&mOptions[RSK_JABU_OPEN],
|
||||||
&mOptions[RSK_LOCK_OVERWORLD_DOORS],
|
&mOptions[RSK_LOCK_OVERWORLD_DOORS],
|
||||||
},
|
},
|
||||||
WidgetContainerType::COLUMN);
|
WidgetContainerType::COLUMN);
|
||||||
|
@ -1407,7 +1407,7 @@ void Settings::CreateOptions() {
|
||||||
&mOptions[RSK_DOOR_OF_TIME],
|
&mOptions[RSK_DOOR_OF_TIME],
|
||||||
&mOptions[RSK_ZORAS_FOUNTAIN],
|
&mOptions[RSK_ZORAS_FOUNTAIN],
|
||||||
&mOptions[RSK_SLEEPING_WATERFALL],
|
&mOptions[RSK_SLEEPING_WATERFALL],
|
||||||
&mOptions[RSK_JABU_JABU_KEY],
|
&mOptions[RSK_JABU_OPEN],
|
||||||
&mOptions[RSK_LOCK_OVERWORLD_DOORS],
|
&mOptions[RSK_LOCK_OVERWORLD_DOORS],
|
||||||
&mOptions[RSK_GERUDO_FORTRESS],
|
&mOptions[RSK_GERUDO_FORTRESS],
|
||||||
&mOptions[RSK_RAINBOW_BRIDGE],
|
&mOptions[RSK_RAINBOW_BRIDGE],
|
||||||
|
|
|
@ -942,19 +942,27 @@ void TimeSaverOnActorInitHandler(void* actorRef) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor->id == ACTOR_EN_JJ && !IS_RANDO) {
|
if (actor->id == ACTOR_EN_JJ && !IS_RANDO) {
|
||||||
enJjUpdateHook = GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>(
|
enJjUpdateHook =
|
||||||
[](void* innerActorRef) mutable {
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnActorUpdate>([](void* innerActorRef) mutable {
|
||||||
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
Actor* innerActor = static_cast<Actor*>(innerActorRef);
|
||||||
if (innerActor->id == ACTOR_EN_JJ && !Flags_GetEventChkInf(EVENTCHKINF_OFFERED_FISH_TO_JABU_JABU) &&
|
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipJabuJabuFish"), 0) && !IS_RANDO) {
|
if (innerActor->id != ACTOR_EN_JJ || Flags_GetEventChkInf(EVENTCHKINF_OFFERED_FISH_TO_JABU_JABU)) {
|
||||||
EnJj* enJj = static_cast<EnJj*>(innerActorRef);
|
return;
|
||||||
if (enJj->actionFunc == EnJj_WaitForFish) {
|
}
|
||||||
EnJj_SetupAction(enJj, EnJj_WaitToOpenMouth);
|
|
||||||
GameInteractor::Instance->UnregisterGameHook<GameInteractor::OnActorUpdate>(enJjUpdateHook);
|
bool shouldOpen = IS_RANDO ? RAND_GET_OPTION(RSK_JABU_OPEN)
|
||||||
GameInteractor::Instance->UnregisterGameHook<GameInteractor::OnSceneInit>(enJjKillHook);
|
: CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipJabuJabuFish"), 0);
|
||||||
enJjUpdateHook = 0;
|
if (!shouldOpen) {
|
||||||
enJjKillHook = 0;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EnJj* enJj = static_cast<EnJj*>(innerActorRef);
|
||||||
|
if (enJj->actionFunc == EnJj_WaitForFish) {
|
||||||
|
EnJj_SetupAction(enJj, EnJj_WaitToOpenMouth);
|
||||||
|
GameInteractor::Instance->UnregisterGameHook<GameInteractor::OnActorUpdate>(enJjUpdateHook);
|
||||||
|
GameInteractor::Instance->UnregisterGameHook<GameInteractor::OnSceneInit>(enJjKillHook);
|
||||||
|
enJjUpdateHook = 0;
|
||||||
|
enJjKillHook = 0;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
enJjKillHook =
|
enJjKillHook =
|
||||||
|
|
|
@ -266,8 +266,7 @@ void SohMenu::AddMenuEnhancements() {
|
||||||
.CVar(CVAR_ENHANCEMENT("TimeSavers.SkipJabuJabuFish"))
|
.CVar(CVAR_ENHANCEMENT("TimeSavers.SkipJabuJabuFish"))
|
||||||
.PreFunc([](WidgetInfo& info) {
|
.PreFunc([](WidgetInfo& info) {
|
||||||
info.options->disabled = IS_RANDO && GameInteractor::IsSaveLoaded(true);
|
info.options->disabled = IS_RANDO && GameInteractor::IsSaveLoaded(true);
|
||||||
info.options->disabledTooltip =
|
info.options->disabledTooltip = "This setting is disabled because a randomizer savefile is loaded.";
|
||||||
"This setting is disabled because a randomizer savefile is loaded.";
|
|
||||||
})
|
})
|
||||||
.Options(CheckboxOptions().Tooltip("Allow Link to enter Jabu-Jabu without feeding him a fish."));
|
.Options(CheckboxOptions().Tooltip("Allow Link to enter Jabu-Jabu without feeding him a fish."));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue