mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 19:27:24 +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))
|
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))
|
{
|
||||||
|
if (Carousel.SelectBeatmap(beatmap, false))
|
||||||
return;
|
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.
|
||||||
if (!Carousel.SelectNextRandom())
|
if (!Carousel.SelectNextRandom())
|
||||||
|
Loading…
Reference in New Issue
Block a user