mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:17:51 +08:00
attempt to select lowest unfiltered difficulty from currently playing beatmapset
This commit is contained in:
parent
901bb01f57
commit
2d5d63dc91
@ -903,12 +903,14 @@ namespace osu.Game.Screens.Select
|
||||
if (Carousel.SelectBeatmap(Beatmap.Value.BeatmapInfo, false))
|
||||
return;
|
||||
|
||||
// prefer not changing ruleset at this point, so look for another difficulty in the currently playing beatmap
|
||||
var found = Beatmap.Value.BeatmapSetInfo.Beatmaps.FirstOrDefault(b => b.Ruleset.Equals(decoupledRuleset.Value));
|
||||
|
||||
if (found != null && Carousel.SelectBeatmap(found, false))
|
||||
// prefer not changing ruleset at this point, so attempt to select the lowest unfiltered difficulty in the currently playing beatmapset.
|
||||
var beatmaps = Beatmap.Value.BeatmapSetInfo.Beatmaps.Where(b => b.Ruleset.Equals(Ruleset.Value)).OrderBy(b => b.StarRating);
|
||||
foreach (var beatmap in beatmaps)
|
||||
{
|
||||
if (Carousel.SelectBeatmap(beatmap, false))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If the current active beatmap could not be selected, select a new random beatmap.
|
||||
if (!Carousel.SelectNextRandom())
|
||||
|
Loading…
Reference in New Issue
Block a user