diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs
index 113e9bbe24..5e93d760e3 100644
--- a/osu.Game/OsuGame.cs
+++ b/osu.Game/OsuGame.cs
@@ -315,11 +315,14 @@ namespace osu.Game
/// The user should have already requested this interactively.
///
/// The beatmap to select.
- /// Predicate used to find a difficulty to select
- public void PresentBeatmap(BeatmapSetInfo beatmap, Predicate findPredicate = null)
+ ///
+ /// Optional predicate used to try and find a difficulty to select.
+ /// If omitted, this will try to present the first beatmap from the current ruleset.
+ /// In case of failure the first difficulty of the set will be presented, ignoring the predicate.
+ ///
+ public void PresentBeatmap(BeatmapSetInfo beatmap, Predicate difficultyCriteria = null)
{
- // Use this predicate if non was provided. This will try to find some difficulty from current ruleset so we wouldn't have to change rulesets
- findPredicate ??= b => b.Ruleset.Equals(Ruleset.Value);
+ difficultyCriteria ??= b => b.Ruleset.Equals(Ruleset.Value);
var databasedSet = beatmap.OnlineBeatmapSetID != null
? BeatmapManager.QueryBeatmapSet(s => s.OnlineBeatmapSetID == beatmap.OnlineBeatmapSetID)
@@ -338,13 +341,13 @@ namespace osu.Game
menuScreen.LoadToSolo();
// we might even already be at the song
- if (Beatmap.Value.BeatmapSetInfo.Hash == databasedSet.Hash && findPredicate(Beatmap.Value.BeatmapInfo))
+ if (Beatmap.Value.BeatmapSetInfo.Hash == databasedSet.Hash && difficultyCriteria(Beatmap.Value.BeatmapInfo))
{
return;
}
// Find first beatmap that matches our predicate.
- var first = databasedSet.Beatmaps.Find(findPredicate) ?? databasedSet.Beatmaps.First();
+ var first = databasedSet.Beatmaps.Find(difficultyCriteria) ?? databasedSet.Beatmaps.First();
Ruleset.Value = first.Ruleset;
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(first);