From cc9e06e16196710572154c111c8ee51bb9417bbd Mon Sep 17 00:00:00 2001 From: smoogipoo <smoogipoo@smgi.me> Date: Tue, 28 Nov 2017 19:07:00 +0900 Subject: [PATCH] Remove unused elements --- osu.Game.Rulesets.Mania/Mods/ManiaMod.cs | 14 +------------- .../Replays/ManiaAutoGenerator.cs | 6 +----- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs b/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs index 164309c227..dfc9993bde 100644 --- a/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs +++ b/osu.Game.Rulesets.Mania/Mods/ManiaMod.cs @@ -176,22 +176,10 @@ namespace osu.Game.Rulesets.Mania.Mods public class ManiaModAutoplay : ModAutoplay<ManiaHitObject> { - private int availableColumns; - - public override void ApplyToRulesetContainer(RulesetContainer<ManiaHitObject> rulesetContainer) - { - // Todo: This shouldn't be done, we should be getting a ManiaBeatmap which should store AvailableColumns - // But this is dependent on a _lot_ of refactoring - var maniaRulesetContainer = (ManiaRulesetContainer)rulesetContainer; - availableColumns = maniaRulesetContainer.AvailableColumns; - - base.ApplyToRulesetContainer(rulesetContainer); - } - protected override Score CreateReplayScore(Beatmap<ManiaHitObject> beatmap) => new Score { User = new User { Username = "osu!topus!" }, - Replay = new ManiaAutoGenerator(beatmap, availableColumns).Generate(), + Replay = new ManiaAutoGenerator(beatmap).Generate(), }; } } diff --git a/osu.Game.Rulesets.Mania/Replays/ManiaAutoGenerator.cs b/osu.Game.Rulesets.Mania/Replays/ManiaAutoGenerator.cs index 2f336d834f..85d840ed70 100644 --- a/osu.Game.Rulesets.Mania/Replays/ManiaAutoGenerator.cs +++ b/osu.Game.Rulesets.Mania/Replays/ManiaAutoGenerator.cs @@ -15,13 +15,9 @@ namespace osu.Game.Rulesets.Mania.Replays { public const double RELEASE_DELAY = 20; - private readonly int availableColumns; - - public ManiaAutoGenerator(Beatmap<ManiaHitObject> beatmap, int availableColumns) + public ManiaAutoGenerator(Beatmap<ManiaHitObject> beatmap) : base(beatmap) { - this.availableColumns = availableColumns; - Replay = new Replay { User = new User { Username = @"Autoplay" } }; }