mirror of
https://github.com/ppy/osu
synced 2024-12-26 08:53:10 +00:00
Append "classic" mod to legacy scores
This commit is contained in:
parent
e3398d8f1f
commit
1a715b2926
@ -65,14 +65,19 @@ namespace osu.Game.Scoring
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mods != null)
|
||||
return mods;
|
||||
|
||||
if (localAPIMods == null)
|
||||
return Array.Empty<Mod>();
|
||||
Mod[] scoreMods = Array.Empty<Mod>();
|
||||
|
||||
var rulesetInstance = Ruleset.CreateInstance();
|
||||
return apiMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
||||
|
||||
if (mods != null)
|
||||
scoreMods = mods;
|
||||
else if (localAPIMods != null)
|
||||
scoreMods = apiMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
||||
|
||||
if (IsLegacyScore)
|
||||
scoreMods = scoreMods.Append(rulesetInstance.GetAllMods().OfType<ModClassic>().Single()).ToArray();
|
||||
|
||||
return scoreMods;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user