1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 17:27:24 +08:00

attempt to select lowest unfiltered difficulty from currently playing beatmapset

This commit is contained in:
Boudewijn Popkema 2024-02-21 23:20:28 +01:00
parent 901bb01f57
commit 2d5d63dc91

View File

@ -903,11 +903,13 @@ namespace osu.Game.Screens.Select
if (Carousel.SelectBeatmap(Beatmap.Value.BeatmapInfo, false)) if (Carousel.SelectBeatmap(Beatmap.Value.BeatmapInfo, false))
return; return;
// prefer not changing ruleset at this point, so look for another difficulty in the currently playing beatmap // prefer not changing ruleset at this point, so attempt to select the lowest unfiltered difficulty in the currently playing beatmapset.
var found = Beatmap.Value.BeatmapSetInfo.Beatmaps.FirstOrDefault(b => b.Ruleset.Equals(decoupledRuleset.Value)); var beatmaps = Beatmap.Value.BeatmapSetInfo.Beatmaps.Where(b => b.Ruleset.Equals(Ruleset.Value)).OrderBy(b => b.StarRating);
foreach (var beatmap in beatmaps)
if (found != null && Carousel.SelectBeatmap(found, false)) {
return; if (Carousel.SelectBeatmap(beatmap, false))
return;
}
} }
// If the current active beatmap could not be selected, select a new random beatmap. // If the current active beatmap could not be selected, select a new random beatmap.