Skip to content

Commit 9392492

Browse files
committed
fix the inability to select the extra edit diffs
1 parent 942869f commit 9392492

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

Themes/Rebirth/Scripts/11 Wheel.lua

+17-13
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Wheel.mt = {
4242
end
4343
end
4444
end,
45-
updateGlobalsFromCurrentItem = function(whee)
45+
updateGlobalsFromCurrentItem = function(whee, updateSteps)
4646
-- update Gamestate current song
4747
local currentItem = whee:getItem(whee.index)
4848
if currentItem.GetDisplayMainTitle then
@@ -117,18 +117,21 @@ Wheel.mt = {
117117
return index, dadiff
118118
end
119119

120-
-- setting diff stuff
121-
local stepslist = WHEELDATA:GetChartsMatchingFilter(currentItem)
122-
if #stepslist == 0 then
123-
-- this scenario should be impossible but lets prepare for the case
124-
GAMESTATE:SetCurrentSteps(PLAYER_1, nil)
125-
else
126-
local prefdiff = GAMESTATE:GetPreferredDifficulty()
127-
128-
diffSelection = findTheDiffToUseBasedOnStepsTypeAndDifficultyBothPreferred(stepslist, prefdiff, GAMESTATE:GetPreferredStepsType())
129-
diffSelection = clamp(diffSelection, 1, #stepslist)
120+
-- only update steps if we want to
121+
if dontUpdateSteps == true then
122+
-- setting diff stuff
123+
local stepslist = WHEELDATA:GetChartsMatchingFilter(currentItem)
124+
if #stepslist == 0 then
125+
-- this scenario should be impossible but lets prepare for the case
126+
GAMESTATE:SetCurrentSteps(PLAYER_1, nil)
127+
else
128+
local prefdiff = GAMESTATE:GetPreferredDifficulty()
129+
130+
diffSelection = findTheDiffToUseBasedOnStepsTypeAndDifficultyBothPreferred(stepslist, prefdiff, GAMESTATE:GetPreferredStepsType())
131+
diffSelection = clamp(diffSelection, 1, #stepslist)
130132

131-
GAMESTATE:SetCurrentSteps(PLAYER_1, stepslist[diffSelection])
133+
GAMESTATE:SetCurrentSteps(PLAYER_1, stepslist[diffSelection])
134+
end
132135
end
133136
else
134137
-- currentItem is a GROUP
@@ -701,7 +704,8 @@ function MusicWheel:new(params)
701704
if songOrPack.GetAllSteps then
702705
-- STARTING SONG
703706
crossedGroupBorder = true
704-
w:updateGlobalsFromCurrentItem()
707+
-- dont update steps (pass true as param)
708+
w:updateGlobalsFromCurrentItem(true)
705709

706710
SCREENMAN:GetTopScreen():SelectCurrent()
707711
SCREENMAN:set_input_redirected(PLAYER_1, false)

0 commit comments

Comments
 (0)