mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +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[]
|
||||
{
|
||||
new CatchModDifficultyAdjust(),
|
||||
new CatchModClassic(),
|
||||
};
|
||||
|
||||
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 ManiaModMirror(),
|
||||
new ManiaModDifficultyAdjust(),
|
||||
new ManiaModClassic(),
|
||||
new ManiaModInvert(),
|
||||
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.Linq;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
@ -16,22 +15,8 @@ using osu.Game.Rulesets.UI;
|
||||
|
||||
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.")]
|
||||
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 TaikoModDifficultyAdjust(),
|
||||
new TaikoModClassic(),
|
||||
};
|
||||
|
||||
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
|
||||
{
|
||||
var rulesetInstance = Ruleset?.CreateInstance();
|
||||
if (rulesetInstance == null)
|
||||
return mods ?? Array.Empty<Mod>();
|
||||
|
||||
Mod[] scoreMods = Array.Empty<Mod>();
|
||||
|
||||
if (mods != null)
|
||||
return mods;
|
||||
scoreMods = mods;
|
||||
else if (localAPIMods != null)
|
||||
scoreMods = apiMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
||||
|
||||
if (localAPIMods == null)
|
||||
return Array.Empty<Mod>();
|
||||
if (IsLegacyScore)
|
||||
scoreMods = scoreMods.Append(rulesetInstance.GetAllMods().OfType<ModClassic>().Single()).ToArray();
|
||||
|
||||
var rulesetInstance = Ruleset.CreateInstance();
|
||||
return apiMods.Select(m => m.ToMod(rulesetInstance)).ToArray();
|
||||
return scoreMods;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user