Append "classic" mod to legacy scores

This commit is contained in:
Salman Ahmed 2021-04-21 09:16:28 +03:00
parent e3398d8f1f
commit 1a715b2926

View File

@ -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
{