mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 19:23:21 +08: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
|
get
|
||||||
{
|
{
|
||||||
if (mods != null)
|
Mod[] scoreMods = Array.Empty<Mod>();
|
||||||
return mods;
|
|
||||||
|
|
||||||
if (localAPIMods == null)
|
|
||||||
return Array.Empty<Mod>();
|
|
||||||
|
|
||||||
var rulesetInstance = Ruleset.CreateInstance();
|
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
|
set
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user