From 9392492f8bf1eb26dabbed216ed7d545f2d7f01b Mon Sep 17 00:00:00 2001 From: Barinade Date: Fri, 22 Oct 2021 20:37:06 -0500 Subject: [PATCH] fix the inability to select the extra edit diffs --- Themes/Rebirth/Scripts/11 Wheel.lua | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/Themes/Rebirth/Scripts/11 Wheel.lua b/Themes/Rebirth/Scripts/11 Wheel.lua index e91b5d1683..41c5d6e539 100644 --- a/Themes/Rebirth/Scripts/11 Wheel.lua +++ b/Themes/Rebirth/Scripts/11 Wheel.lua @@ -42,7 +42,7 @@ Wheel.mt = { end end end, - updateGlobalsFromCurrentItem = function(whee) + updateGlobalsFromCurrentItem = function(whee, updateSteps) -- update Gamestate current song local currentItem = whee:getItem(whee.index) if currentItem.GetDisplayMainTitle then @@ -117,18 +117,21 @@ Wheel.mt = { return index, dadiff end - -- setting diff stuff - local stepslist = WHEELDATA:GetChartsMatchingFilter(currentItem) - if #stepslist == 0 then - -- this scenario should be impossible but lets prepare for the case - GAMESTATE:SetCurrentSteps(PLAYER_1, nil) - else - local prefdiff = GAMESTATE:GetPreferredDifficulty() - - diffSelection = findTheDiffToUseBasedOnStepsTypeAndDifficultyBothPreferred(stepslist, prefdiff, GAMESTATE:GetPreferredStepsType()) - diffSelection = clamp(diffSelection, 1, #stepslist) + -- only update steps if we want to + if dontUpdateSteps == true then + -- setting diff stuff + local stepslist = WHEELDATA:GetChartsMatchingFilter(currentItem) + if #stepslist == 0 then + -- this scenario should be impossible but lets prepare for the case + GAMESTATE:SetCurrentSteps(PLAYER_1, nil) + else + local prefdiff = GAMESTATE:GetPreferredDifficulty() + + diffSelection = findTheDiffToUseBasedOnStepsTypeAndDifficultyBothPreferred(stepslist, prefdiff, GAMESTATE:GetPreferredStepsType()) + diffSelection = clamp(diffSelection, 1, #stepslist) - GAMESTATE:SetCurrentSteps(PLAYER_1, stepslist[diffSelection]) + GAMESTATE:SetCurrentSteps(PLAYER_1, stepslist[diffSelection]) + end end else -- currentItem is a GROUP @@ -701,7 +704,8 @@ function MusicWheel:new(params) if songOrPack.GetAllSteps then -- STARTING SONG crossedGroupBorder = true - w:updateGlobalsFromCurrentItem() + -- dont update steps (pass true as param) + w:updateGlobalsFromCurrentItem(true) SCREENMAN:GetTopScreen():SelectCurrent() SCREENMAN:set_input_redirected(PLAYER_1, false)