-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Switch ruleset in SongSelectV2 when needed #35996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| checkAndApplyRuleset(); | ||
|
|
||
| ensureGlobalBeatmapValid(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know about any of this.
This is approaching too many levels of adjustments. Previously a global change happening was handled pretty simply: check if it's valid selection for song select, and if not, choose something else valid. But this? Now with this it's
- when receiving an external beatmap change, maybe change the external beatmap to something else again, or maybe change the ruleset to a different one
- and then immediately after doing that validate the selection that you just potentially modified
Like which one is it? Is external selection going to impose state of song select, or is it going to yield selection validity to song select? You can't have it both ways.
@peppy would want you to look at this as well and express your view.
| // try to find a beatmap whose ruleset is current. | ||
| var beatmapWithinCurrentRuleset = Beatmap.Value.BeatmapSetInfo.Beatmaps.FirstOrDefault(b => b.Ruleset.Equals(Ruleset.Value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not appear to take converts into account
|
|
||
| if (beatmapWithinCurrentRuleset != null) | ||
| { | ||
| Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmapWithinCurrentRuleset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this unconditionally touch the global beatmap again? inside a global beatmap change callback? that's recursive. why doesn't it only perform the change when necessary?
| debounceQueueSelection(groupedBeatmap.Beatmap); | ||
| } | ||
|
|
||
| private bool checkAndApplyRuleset() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this have a return value if it's never checked?
Like SongSelectV1, when current beatmapset is changed from outside (like playlist) and the beatmap isn't in line with the current ruleset, switch to the new ruleset (or beatmaps whose ruleset is current).
2025-12-14.16-11-50-cut.mp4