diff --git a/osu.Game/Tests/Visual/ModPerfectTestScene.cs b/osu.Game/Tests/Visual/ModPerfectTestScene.cs index 31d2ce9281..4bc00425bf 100644 --- a/osu.Game/Tests/Visual/ModPerfectTestScene.cs +++ b/osu.Game/Tests/Visual/ModPerfectTestScene.cs @@ -1,29 +1,28 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -using osu.Framework.Extensions.TypeExtensions; using osu.Game.Beatmaps; using osu.Game.Rulesets; using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Objects; -using osu.Game.Scoring; namespace osu.Game.Tests.Visual { - public abstract class ModPerfectTestScene : ModSandboxTestScene + public abstract class ModPerfectTestScene : ModTestScene { private readonly Ruleset ruleset; - private readonly ModPerfect perfectMod; + private readonly ModPerfect mod; - protected ModPerfectTestScene(Ruleset ruleset, ModPerfect perfectMod) + protected ModPerfectTestScene(Ruleset ruleset, ModPerfect mod) : base(ruleset) { this.ruleset = ruleset; - this.perfectMod = perfectMod; + this.mod = mod; } - protected void CreateHitObjectTest(HitObjectTestCase testCaseData, bool shouldMiss) => CreateModTest(new ModTestCaseData(testCaseData.HitObject.GetType().ReadableName(), perfectMod) + protected void CreateHitObjectTest(HitObjectTestCase testCaseData, bool shouldMiss) => CreateModTest(new ModTestData { + Mod = mod, Beatmap = new Beatmap { BeatmapInfo = { Ruleset = ruleset.RulesetInfo }, @@ -33,15 +32,10 @@ namespace osu.Game.Tests.Visual PassCondition = () => ((PerfectModTestPlayer)Player).CheckFailed(shouldMiss && testCaseData.FailOnMiss) }); - protected sealed override TestPlayer CreateReplayPlayer(Score score) => new PerfectModTestPlayer(score); + protected override TestPlayer CreatePlayer(Ruleset ruleset) => new PerfectModTestPlayer(); private class PerfectModTestPlayer : TestPlayer { - public PerfectModTestPlayer(Score score) - : base(score) - { - } - protected override bool AllowFail => true; public bool CheckFailed(bool failed) diff --git a/osu.Game/Tests/Visual/ModTestScene.cs b/osu.Game/Tests/Visual/ModTestScene.cs index 9abe543bf6..eb418304d9 100644 --- a/osu.Game/Tests/Visual/ModTestScene.cs +++ b/osu.Game/Tests/Visual/ModTestScene.cs @@ -46,7 +46,7 @@ namespace osu.Game.Tests.Visual protected sealed override IBeatmap CreateBeatmap(RulesetInfo ruleset) => currentTestData?.Beatmap ?? base.CreateBeatmap(ruleset); - protected sealed override TestPlayer CreatePlayer(Ruleset ruleset) + protected override TestPlayer CreatePlayer(Ruleset ruleset) { var mods = new List(SelectedMods.Value);