mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 23:12:56 +08:00
Merge pull request #12515 from frenzibyte/legacy-scores-classic-mod
Apply "classic" mod to all legacy scores
This commit is contained in:
commit
739d83da2a
@ -114,6 +114,7 @@ namespace osu.Game.Rulesets.Catch
|
|||||||
return new Mod[]
|
return new Mod[]
|
||||||
{
|
{
|
||||||
new CatchModDifficultyAdjust(),
|
new CatchModDifficultyAdjust(),
|
||||||
|
new CatchModClassic(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Automation:
|
case ModType.Automation:
|
||||||
|
11
osu.Game.Rulesets.Catch/Mods/CatchModClassic.cs
Normal file
11
osu.Game.Rulesets.Catch/Mods/CatchModClassic.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Catch.Mods
|
||||||
|
{
|
||||||
|
public class CatchModClassic : ModClassic
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -239,6 +239,7 @@ namespace osu.Game.Rulesets.Mania
|
|||||||
new ManiaModDualStages(),
|
new ManiaModDualStages(),
|
||||||
new ManiaModMirror(),
|
new ManiaModMirror(),
|
||||||
new ManiaModDifficultyAdjust(),
|
new ManiaModDifficultyAdjust(),
|
||||||
|
new ManiaModClassic(),
|
||||||
new ManiaModInvert(),
|
new ManiaModInvert(),
|
||||||
new ManiaModConstantSpeed()
|
new ManiaModConstantSpeed()
|
||||||
};
|
};
|
||||||
|
11
osu.Game.Rulesets.Mania/Mods/ManiaModClassic.cs
Normal file
11
osu.Game.Rulesets.Mania/Mods/ManiaModClassic.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Mania.Mods
|
||||||
|
{
|
||||||
|
public class ManiaModClassic : ModClassic
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -4,7 +4,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Objects;
|
using osu.Game.Rulesets.Objects;
|
||||||
@ -16,22 +15,8 @@ using osu.Game.Rulesets.UI;
|
|||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Mods
|
namespace osu.Game.Rulesets.Osu.Mods
|
||||||
{
|
{
|
||||||
public class OsuModClassic : Mod, IApplicableToHitObject, IApplicableToDrawableHitObjects, IApplicableToDrawableRuleset<OsuHitObject>
|
public class OsuModClassic : ModClassic, IApplicableToHitObject, IApplicableToDrawableHitObjects, IApplicableToDrawableRuleset<OsuHitObject>
|
||||||
{
|
{
|
||||||
public override string Name => "Classic";
|
|
||||||
|
|
||||||
public override string Acronym => "CL";
|
|
||||||
|
|
||||||
public override double ScoreMultiplier => 1;
|
|
||||||
|
|
||||||
public override IconUsage? Icon => FontAwesome.Solid.History;
|
|
||||||
|
|
||||||
public override string Description => "Feeling nostalgic?";
|
|
||||||
|
|
||||||
public override bool Ranked => false;
|
|
||||||
|
|
||||||
public override ModType Type => ModType.Conversion;
|
|
||||||
|
|
||||||
[SettingSource("No slider head accuracy requirement", "Scores sliders proportionally to the number of ticks hit.")]
|
[SettingSource("No slider head accuracy requirement", "Scores sliders proportionally to the number of ticks hit.")]
|
||||||
public Bindable<bool> NoSliderHeadAccuracy { get; } = new BindableBool(true);
|
public Bindable<bool> NoSliderHeadAccuracy { get; } = new BindableBool(true);
|
||||||
|
|
||||||
|
11
osu.Game.Rulesets.Taiko/Mods/TaikoModClassic.cs
Normal file
11
osu.Game.Rulesets.Taiko/Mods/TaikoModClassic.cs
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Game.Rulesets.Mods;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Taiko.Mods
|
||||||
|
{
|
||||||
|
public class TaikoModClassic : ModClassic
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -135,6 +135,7 @@ namespace osu.Game.Rulesets.Taiko
|
|||||||
{
|
{
|
||||||
new TaikoModRandom(),
|
new TaikoModRandom(),
|
||||||
new TaikoModDifficultyAdjust(),
|
new TaikoModDifficultyAdjust(),
|
||||||
|
new TaikoModClassic(),
|
||||||
};
|
};
|
||||||
|
|
||||||
case ModType.Automation:
|
case ModType.Automation:
|
||||||
|
24
osu.Game/Rulesets/Mods/ModClassic.cs
Normal file
24
osu.Game/Rulesets/Mods/ModClassic.cs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Mods
|
||||||
|
{
|
||||||
|
public abstract class ModClassic : Mod
|
||||||
|
{
|
||||||
|
public override string Name => "Classic";
|
||||||
|
|
||||||
|
public override string Acronym => "CL";
|
||||||
|
|
||||||
|
public override double ScoreMultiplier => 1;
|
||||||
|
|
||||||
|
public override IconUsage? Icon => FontAwesome.Solid.History;
|
||||||
|
|
||||||
|
public override string Description => "Feeling nostalgic?";
|
||||||
|
|
||||||
|
public override bool Ranked => false;
|
||||||
|
|
||||||
|
public override ModType Type => ModType.Conversion;
|
||||||
|
}
|
||||||
|
}
|
@ -65,14 +65,21 @@ namespace osu.Game.Scoring
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
var rulesetInstance = Ruleset?.CreateInstance();
|
||||||
|
if (rulesetInstance == null)
|
||||||
|
return mods ?? Array.Empty<Mod>();
|
||||||
|
|
||||||
|
Mod[] scoreMods = Array.Empty<Mod>();
|
||||||
|
|
||||||
if (mods != null)
|
if (mods != null)
|
||||||
return mods;
|
scoreMods = mods;
|
||||||
|
else if (localAPIMods != null)
|
||||||
|
scoreMods = apiMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
||||||
|
|
||||||
if (localAPIMods == null)
|
if (IsLegacyScore)
|
||||||
return Array.Empty<Mod>();
|
scoreMods = scoreMods.Append(rulesetInstance.GetAllMods().OfType<ModClassic>().Single()).ToArray();
|
||||||
|
|
||||||
var rulesetInstance = Ruleset.CreateInstance();
|
return scoreMods;
|
||||||
return apiMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user