mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-10-31 23:55:06 -04:00
Unify "No forced dialog" settings in combo box (#4425)
* Unify "No forced dialog" settings in combo box * Rename options
This commit is contained in:
parent
e178df3e0c
commit
c1295f33fe
@ -21,6 +21,13 @@ typedef enum {
|
|||||||
SGIA_SIZE
|
SGIA_SIZE
|
||||||
} SkipGetItemAnimationType;
|
} SkipGetItemAnimationType;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
FORCED_DIALOG_SKIP_NONE,
|
||||||
|
FORCED_DIALOG_SKIP_NAVI,
|
||||||
|
FORCED_DIALOG_SKIP_NPC,
|
||||||
|
FORCED_DIALOG_SKIP_ALL
|
||||||
|
} ForcedDialogMode;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
BUNNY_HOOD_VANILLA,
|
BUNNY_HOOD_VANILLA,
|
||||||
BUNNY_HOOD_FAST_AND_JUMP,
|
BUNNY_HOOD_FAST_AND_JUMP,
|
||||||
|
@ -302,6 +302,7 @@ const std::vector<const char*> enhancementsCvars = {
|
|||||||
CVAR_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"),
|
CVAR_ENHANCEMENT("TimeSavers.SkipGetItemAnimation"),
|
||||||
CVAR_ENHANCEMENT("TimeSavers.SkipChildStealth"),
|
CVAR_ENHANCEMENT("TimeSavers.SkipChildStealth"),
|
||||||
CVAR_ENHANCEMENT("TimeSavers.SkipTowerEscape"),
|
CVAR_ENHANCEMENT("TimeSavers.SkipTowerEscape"),
|
||||||
|
CVAR_ENHANCEMENT("TimeSavers.SkipForcedDialog"),
|
||||||
CVAR_ENHANCEMENT("SlowTextSpeed"),
|
CVAR_ENHANCEMENT("SlowTextSpeed"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -101,6 +101,12 @@ void RateLimitedSuccessChime() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ForcedDialogIsDisabled(ForcedDialogMode type) {
|
||||||
|
return (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipForcedDialog"),
|
||||||
|
IS_RANDO ? FORCED_DIALOG_SKIP_ALL : FORCED_DIALOG_SKIP_NONE) &
|
||||||
|
type) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
void TimeSaverOnGameFrameUpdateHandler() {
|
void TimeSaverOnGameFrameUpdateHandler() {
|
||||||
if (successChimeCooldown > 0) {
|
if (successChimeCooldown > 0) {
|
||||||
successChimeCooldown--;
|
successChimeCooldown--;
|
||||||
@ -311,14 +317,14 @@ void TimeSaverOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_li
|
|||||||
break;
|
break;
|
||||||
case VB_WONDER_TALK: {
|
case VB_WONDER_TALK: {
|
||||||
//We want to show the frog hint if it is on, regardless of cutscene settings
|
//We want to show the frog hint if it is on, regardless of cutscene settings
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), IS_RANDO) &&
|
if (ForcedDialogIsDisabled(FORCED_DIALOG_SKIP_NPC) &&
|
||||||
!(gPlayState->sceneNum == SCENE_ZORAS_RIVER && IS_RANDO && RAND_GET_OPTION(RSK_FROGS_HINT))) {
|
!(gPlayState->sceneNum == SCENE_ZORAS_RIVER && IS_RANDO && RAND_GET_OPTION(RSK_FROGS_HINT))) {
|
||||||
*should = false;
|
*should = false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VB_NAVI_TALK: {
|
case VB_NAVI_TALK: {
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), IS_RANDO)) {
|
if (ForcedDialogIsDisabled(FORCED_DIALOG_SKIP_NAVI)) {
|
||||||
ElfMsg* naviTalk = va_arg(args, ElfMsg*);
|
ElfMsg* naviTalk = va_arg(args, ElfMsg*);
|
||||||
if (((naviTalk->actor.params >> 8) & 0x3F) != 0x3F) {
|
if (((naviTalk->actor.params >> 8) & 0x3F) != 0x3F) {
|
||||||
Flags_SetSwitch(gPlayState, (naviTalk->actor.params >> 8) & 0x3F);
|
Flags_SetSwitch(gPlayState, (naviTalk->actor.params >> 8) & 0x3F);
|
||||||
|
@ -77,6 +77,7 @@ static const char* imguiScaleOptions[4] = { "Small", "Normal", "Large", "X-Large
|
|||||||
|
|
||||||
static const char* chestStyleMatchesContentsOptions[4] = { "Disabled", "Both", "Texture Only", "Size Only" };
|
static const char* chestStyleMatchesContentsOptions[4] = { "Disabled", "Both", "Texture Only", "Size Only" };
|
||||||
static const char* skipGetItemAnimationOptions[3] = { "Disabled", "Junk Items", "All Items" };
|
static const char* skipGetItemAnimationOptions[3] = { "Disabled", "Junk Items", "All Items" };
|
||||||
|
static const char* skipForcedDialogOptions[4] = { "None", "Navi Only", "NPCs Only", "All" };
|
||||||
static const char* bunnyHoodOptions[3] = { "Disabled", "Faster Run & Longer Jump", "Faster Run" };
|
static const char* bunnyHoodOptions[3] = { "Disabled", "Faster Run & Longer Jump", "Faster Run" };
|
||||||
static const char* mirroredWorldModes[9] = {
|
static const char* mirroredWorldModes[9] = {
|
||||||
"Disabled", "Always", "Random", "Random (Seeded)", "Dungeons",
|
"Disabled", "Always", "Random", "Random (Seeded)", "Dungeons",
|
||||||
@ -589,7 +590,6 @@ void DrawEnhancementsMenu() {
|
|||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO) &&
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO) &&
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO) &&
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO) &&
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO) &&
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO) &&
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), IS_RANDO) &&
|
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) &&
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) &&
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) &&
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) &&
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), IS_RANDO);
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), IS_RANDO);
|
||||||
@ -601,7 +601,6 @@ void DrawEnhancementsMenu() {
|
|||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO) ||
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), IS_RANDO) ||
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO) ||
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), IS_RANDO) ||
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO) ||
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), IS_RANDO) ||
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), IS_RANDO) ||
|
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) ||
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), IS_RANDO) ||
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) ||
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), IS_RANDO) ||
|
||||||
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), IS_RANDO);
|
CVarGetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), IS_RANDO);
|
||||||
@ -618,7 +617,6 @@ void DrawEnhancementsMenu() {
|
|||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), 1);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), 1);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), 1);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), 1);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), 1);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), 1);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), 1);
|
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), 1);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), 1);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), 1);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), 1);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), 1);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), 1);
|
||||||
@ -630,7 +628,6 @@ void DrawEnhancementsMenu() {
|
|||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), 0);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), 0);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), 0);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), 0);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), 0);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), 0);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), 0);
|
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), 0);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), 0);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), 0);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), 0);
|
||||||
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), 0);
|
CVarSetInteger(CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), 0);
|
||||||
@ -645,8 +642,6 @@ void DrawEnhancementsMenu() {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Skip Boss Introductions", CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
UIWidgets::PaddedEnhancementCheckbox("Skip Boss Introductions", CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.BossIntro"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Quick Boss Deaths", CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
UIWidgets::PaddedEnhancementCheckbox("Quick Boss Deaths", CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.QuickBossDeaths"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Skip One Point Cutscenes (Chests, Door Unlocks, etc)", CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
UIWidgets::PaddedEnhancementCheckbox("Skip One Point Cutscenes (Chests, Door Unlocks, etc)", CVAR_ENHANCEMENT("TimeSavers.SkipCutscene.OnePoint"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
||||||
UIWidgets::PaddedEnhancementCheckbox("No Forced Dialog", CVAR_ENHANCEMENT("TimeSavers.NoForcedDialog"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
|
||||||
UIWidgets::Tooltip("Prevent forced conversations with Navi or other NPCs");
|
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Skip Owl Interactions", CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
UIWidgets::PaddedEnhancementCheckbox("Skip Owl Interactions", CVAR_ENHANCEMENT("TimeSavers.SkipOwlInteractions"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Skip Misc Interactions", CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
UIWidgets::PaddedEnhancementCheckbox("Skip Misc Interactions", CVAR_ENHANCEMENT("TimeSavers.SkipMiscInteractions"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Disable Title Card", CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
UIWidgets::PaddedEnhancementCheckbox("Disable Title Card", CVAR_ENHANCEMENT("TimeSavers.DisableTitleCard"), false, false, false, "", UIWidgets::CheckboxGraphics::Cross, IS_RANDO);
|
||||||
@ -664,6 +659,10 @@ void DrawEnhancementsMenu() {
|
|||||||
UIWidgets::Tooltip("The size of the item when it is picked up");
|
UIWidgets::Tooltip("The size of the item when it is picked up");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UIWidgets::PaddedText("Skip Forced Dialog", true, false);
|
||||||
|
UIWidgets::EnhancementCombobox(CVAR_ENHANCEMENT("TimeSavers.SkipForcedDialog"), skipForcedDialogOptions, FORCED_DIALOG_SKIP_NONE);
|
||||||
|
UIWidgets::Tooltip("Prevent forced conversations with Navi or other NPCs");
|
||||||
|
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", CVAR_ENHANCEMENT("TextSpeed"), 1, 5, "", 1, true, false, true);
|
UIWidgets::PaddedEnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", CVAR_ENHANCEMENT("TextSpeed"), 1, 5, "", 1, true, false, true);
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Skip Text", CVAR_ENHANCEMENT("SkipText"), false, true);
|
UIWidgets::PaddedEnhancementCheckbox("Skip Text", CVAR_ENHANCEMENT("SkipText"), false, true);
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Slow Text Speed: %dx", "##SLOWTEXTSPEED", CVAR_ENHANCEMENT("SlowTextSpeed"), 1, 5, "", 1, true, false, true);
|
UIWidgets::PaddedEnhancementSliderInt("Slow Text Speed: %dx", "##SLOWTEXTSPEED", CVAR_ENHANCEMENT("SlowTextSpeed"), 1, 5, "", 1, true, false, true);
|
||||||
@ -704,8 +703,6 @@ void DrawEnhancementsMenu() {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Remember Save Location", CVAR_ENHANCEMENT("RememberSaveLocation"), false, false);
|
UIWidgets::PaddedEnhancementCheckbox("Remember Save Location", CVAR_ENHANCEMENT("RememberSaveLocation"), false, false);
|
||||||
UIWidgets::Tooltip("When loading a save, places Link at the last entrance he went through.\n"
|
UIWidgets::Tooltip("When loading a save, places Link at the last entrance he went through.\n"
|
||||||
"This doesn't work if the save was made in grottos/fairy fountains or dungeons.");
|
"This doesn't work if the save was made in grottos/fairy fountains or dungeons.");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("No Forced Navi", CVAR_ENHANCEMENT("NoForcedNavi"), true, false);
|
|
||||||
UIWidgets::Tooltip("Prevent forced Navi conversations");
|
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Navi Timer Resets", CVAR_ENHANCEMENT("ResetNaviTimer"), true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Navi Timer Resets", CVAR_ENHANCEMENT("ResetNaviTimer"), true, false);
|
||||||
UIWidgets::Tooltip("Resets the Navi timer on scene change. If you have already talked to her, she will try and talk to you again, instead of needing a save warp or death. ");
|
UIWidgets::Tooltip("Resets the Navi timer on scene change. If you have already talked to her, she will try and talk to you again, instead of needing a save warp or death. ");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("No Skulltula Freeze", CVAR_ENHANCEMENT("SkulltulaFreeze"), true, false);
|
UIWidgets::PaddedEnhancementCheckbox("No Skulltula Freeze", CVAR_ENHANCEMENT("SkulltulaFreeze"), true, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user