mirror of
https://github.com/ppy/osu
synced 2025-01-31 10:22:02 +00:00
Avoid changing ruleset when presenting a beatmap if it can be converted
Closes #21415.
This commit is contained in:
parent
e99be3b4f5
commit
25410c9962
@ -520,11 +520,29 @@ namespace osu.Game
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Logger.Log($"Completing {nameof(PresentBeatmap)} with beatmap {beatmap} ruleset {selection.Ruleset}");
|
// Don't change the local ruleset if the user is on another ruleset and is showing converted beatmaps at song select.
|
||||||
|
// Eventually we probably want to check whether conversion is actually possible for the current ruleset.
|
||||||
|
bool requiresRulesetSwitch = !selection.Ruleset.Equals(Ruleset.Value)
|
||||||
|
&& (selection.Ruleset.OnlineID > 0 || !LocalConfig.Get<bool>(OsuSetting.ShowConvertedBeatmaps));
|
||||||
|
|
||||||
|
if (requiresRulesetSwitch)
|
||||||
|
{
|
||||||
Ruleset.Value = selection.Ruleset;
|
Ruleset.Value = selection.Ruleset;
|
||||||
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(selection);
|
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(selection);
|
||||||
|
|
||||||
|
Logger.Log($"Completing {nameof(PresentBeatmap)} with beatmap {beatmap} ruleset {selection.Ruleset}");
|
||||||
}
|
}
|
||||||
}, validScreens: new[] { typeof(SongSelect), typeof(IHandlePresentBeatmap) });
|
else
|
||||||
|
{
|
||||||
|
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(selection);
|
||||||
|
|
||||||
|
Logger.Log($"Completing {nameof(PresentBeatmap)} with beatmap {beatmap} (maintaining ruleset)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, validScreens: new[]
|
||||||
|
{
|
||||||
|
typeof(SongSelect), typeof(IHandlePresentBeatmap)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user