mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:15:08 +08:00
Add ruleset fallback logic into cache lookup class
This commit is contained in:
parent
d3a303e251
commit
f51cb0dd14
@ -273,7 +273,8 @@ namespace osu.Game.Beatmaps
|
||||
public DifficultyCacheLookup([NotNull] BeatmapInfo beatmap, [NotNull] RulesetInfo ruleset, IEnumerable<Mod> mods)
|
||||
{
|
||||
Beatmap = beatmap;
|
||||
Ruleset = ruleset;
|
||||
// In the case that the user hasn't given us a ruleset, use the beatmap's default ruleset.
|
||||
Ruleset = ruleset ?? Beatmap.Ruleset;
|
||||
OrderedMods = mods?.OrderBy(m => m.Acronym).ToArray() ?? Array.Empty<Mod>();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user