From 7d2170c82b682c04331c32239421a28963e91b7d Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Sat, 20 Aug 2022 17:24:12 -0400 Subject: [PATCH] Stops syncing GS Flags with GS Token Count with Skullsanity on. --- .../Enhancements/debugger/debugSaveEditor.cpp | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index e1d2b8060..174aa63d0 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -911,15 +911,19 @@ void DrawFlagsTab() { setMask <<= 1; } - static bool keepGsCountUpdated = true; - ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated); - InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags"); - int32_t gsCount = 0; - if (keepGsCountUpdated) { - for (int32_t gsFlagIndex = 0; gsFlagIndex < 6; gsFlagIndex++) { - gsCount += std::popcount(static_cast(gSaveContext.gsFlags[gsFlagIndex])); + // If playing a Randomizer Save with Shuffle Skull Tokens on anything other than "Off" we don't want to keep + // GS Token Count updated, since Gold Skulltulas killed will not correlate to GS Tokens Collected. + if (!(gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_TOKENS))) { + static bool keepGsCountUpdated = true; + ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated); + InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags."); + int32_t gsCount = 0; + if (keepGsCountUpdated) { + for (int32_t gsFlagIndex = 0; gsFlagIndex < 6; gsFlagIndex++) { + gsCount += std::popcount(static_cast(gSaveContext.gsFlags[gsFlagIndex])); + } + gSaveContext.inventory.gsTokens = gsCount; } - gSaveContext.inventory.gsTokens = gsCount; } });