mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
Fix Available Checks On Load (#5599)
* Setup call to RecalculateAvailableChecks instead of direct call. * Remove RecalculateAvailableChecks from CheckTrackerSettingsWindow::DrawElement.
This commit is contained in:
parent
b564148380
commit
17613d1f50
1 changed files with 7 additions and 6 deletions
|
@ -587,7 +587,7 @@ void CheckTrackerLoadGame(int32_t fileNum) {
|
|||
Rando::Context::GetInstance()->GetEntranceShuffler()->ApplyEntranceOverrides();
|
||||
}
|
||||
|
||||
RecalculateAvailableChecks();
|
||||
recalculateAvailable = true;
|
||||
}
|
||||
|
||||
void CheckTrackerShopSlotChange(uint8_t cursorSlot, int16_t basePrice) {
|
||||
|
@ -994,6 +994,11 @@ void CheckTrackerWindow::DrawElement() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (recalculateAvailable) {
|
||||
recalculateAvailable = false;
|
||||
RecalculateAvailableChecks();
|
||||
}
|
||||
|
||||
SceneID sceneId = SCENE_ID_MAX;
|
||||
if (gPlayState != nullptr) {
|
||||
sceneId = (SceneID)gPlayState->sceneNum;
|
||||
|
@ -1986,7 +1991,7 @@ void ImGuiDrawTwoColorPickerSection(const char* text, const char* cvarMainName,
|
|||
}
|
||||
|
||||
void RecalculateAvailableChecks(RandomizerRegion startingRegion /* = RR_ROOT */) {
|
||||
if (!enableAvailableChecks || !GameInteractor::IsSaveLoaded(true)) {
|
||||
if (!enableAvailableChecks || !GameInteractor::IsSaveLoaded()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2052,10 +2057,6 @@ static std::unordered_map<int32_t, const char*> buttonStrings = {
|
|||
};
|
||||
|
||||
void CheckTrackerSettingsWindow::DrawElement() {
|
||||
if (recalculateAvailable) {
|
||||
recalculateAvailable = false;
|
||||
RecalculateAvailableChecks();
|
||||
}
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_CellPadding, { 8.0f, 8.0f });
|
||||
if (ImGui::BeginTable("CheckTrackerSettingsTable", 2, ImGuiTableFlags_BordersH | ImGuiTableFlags_BordersV)) {
|
||||
ImGui::TableSetupColumn("General settings", ImGuiTableColumnFlags_WidthStretch, 200.0f);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue