diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp index 573a86090..5b42be95e 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_objects.cpp @@ -117,7 +117,9 @@ void RandomizerCheckObjects::UpdateImGuiVisibility() { RO_MQ_DUNGEONS_SET_NUMBER && (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonCount"), 12) > 0) || // at least one MQ dungeon CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE) == - RO_MQ_DUNGEONS_RANDOM_NUMBER)) || + RO_MQ_DUNGEONS_RANDOM_NUMBER || + CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE) == + RO_MQ_DUNGEONS_SELECTION)) || location.GetQuest() == RCQUEST_VANILLA && (CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), RO_MQ_DUNGEONS_NONE) != RO_MQ_DUNGEONS_SET_NUMBER || diff --git a/soh/soh/SohGui/SohMenuRandomizer.cpp b/soh/soh/SohGui/SohMenuRandomizer.cpp index 347e56b58..0c11dffc8 100644 --- a/soh/soh/SohGui/SohMenuRandomizer.cpp +++ b/soh/soh/SohGui/SohMenuRandomizer.cpp @@ -22,6 +22,7 @@ static const std::map skipGetItemAnimationOptions = { static bool locationsDirty = true; static bool tricksDirty = true; +static int32_t prevMQDungeonSetting; static char seedString[MAX_SEED_STRING_SIZE]; static std::set excludedLocations; static std::set enabledTricks; @@ -29,12 +30,14 @@ static std::set enabledGlitches; void DrawLocationsMenu(WidgetInfo& info) { auto ctx = OTRGlobals::Instance->gRandoContext; + int32_t currMQDungeonSetting = CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeons"), 0) | + CVarGetInteger(CVAR_RANDOMIZER_SETTING("MQDungeonCount"), 0) << 8; static ImVec2 cellPadding(8.0f, 8.0f); bool generating = CVarGetInteger(CVAR_GENERAL("RandoGenerating"), 0); bool disableEditingRandoSettings = generating || CVarGetInteger(CVAR_GENERAL("OnFileSelectNameEntry"), 0); ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0) || disableEditingRandoSettings); ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, cellPadding); - if (locationsDirty) { + if (locationsDirty || currMQDungeonSetting != prevMQDungeonSetting) { RandomizerCheckObjects::UpdateImGuiVisibility(); // todo: this efficently when we build out cvar array support std::stringstream excludedLocationStringStream(CVarGetString(CVAR_RANDOMIZER_SETTING("ExcludedLocations"), "")); @@ -45,6 +48,7 @@ void DrawLocationsMenu(WidgetInfo& info) { } locationsDirty = false; } + prevMQDungeonSetting = currMQDungeonSetting; if (ImGui::BeginTable("tableRandoLocations", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) { ImGui::TableSetupColumn("Included", ImGuiTableColumnFlags_WidthStretch, 200.0f);