From db3e48c194ed7a0838b3390dab7152cf37ecde84 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 7 May 2018 10:40:30 +0900 Subject: [PATCH] Rename GetBeatmap() to GetPlayableBeatmap() --- .../Beatmaps/BeatmapManager_WorkingBeatmap.cs | 2 +- osu.Game/Beatmaps/DummyWorkingBeatmap.cs | 2 +- osu.Game/Beatmaps/WorkingBeatmap.cs | 15 +++++++++------ osu.Game/Rulesets/UI/RulesetContainer.cs | 2 +- osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs b/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs index 71406c6034..400c877d6a 100644 --- a/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/BeatmapManager_WorkingBeatmap.cs @@ -30,7 +30,7 @@ namespace osu.Game.Beatmaps this.audioManager = audioManager; } - protected override IBeatmap GetBeatmap() + protected override IBeatmap GetPlayableBeatmap() { try { diff --git a/osu.Game/Beatmaps/DummyWorkingBeatmap.cs b/osu.Game/Beatmaps/DummyWorkingBeatmap.cs index da52dc7284..2c9d83fe9e 100644 --- a/osu.Game/Beatmaps/DummyWorkingBeatmap.cs +++ b/osu.Game/Beatmaps/DummyWorkingBeatmap.cs @@ -40,7 +40,7 @@ namespace osu.Game.Beatmaps this.game = game; } - protected override IBeatmap GetBeatmap() => new Beatmap(); + protected override IBeatmap GetPlayableBeatmap() => new Beatmap(); protected override Texture GetBackground() => game.Textures.Get(@"Backgrounds/bg4"); diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs index e90df687e4..515b7c2051 100644 --- a/osu.Game/Beatmaps/WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/WorkingBeatmap.cs @@ -57,7 +57,7 @@ namespace osu.Game.Beatmaps Process.Start(path); } - protected abstract IBeatmap GetBeatmap(); + protected abstract IBeatmap GetPlayableBeatmap(); protected abstract Texture GetBackground(); protected abstract Track GetTrack(); protected virtual Skin GetSkin() => new DefaultSkin(); @@ -71,7 +71,7 @@ namespace osu.Game.Beatmaps private IBeatmap populateBeatmap() { - var b = GetBeatmap() ?? new Beatmap(); + var b = GetPlayableBeatmap() ?? new Beatmap(); // use the database-backed info. b.BeatmapInfo = BeatmapInfo; @@ -80,13 +80,16 @@ namespace osu.Game.Beatmaps } /// - /// Retrieves the resulting from the conversion of to a specific . - /// All mods have been applied to the returned . + /// Constructs a playable from using the applicable converters for a specific . + /// + /// The returned is in a playable state - all and s + /// have been applied, and s have been fully constructed. + /// /// - /// The to convert to. + /// The to create a playable for. /// The converted . /// If could not be converted to . - public IBeatmap GetBeatmap(RulesetInfo ruleset) + public IBeatmap GetPlayableBeatmap(RulesetInfo ruleset) { var rulesetInstance = ruleset.CreateInstance(); diff --git a/osu.Game/Rulesets/UI/RulesetContainer.cs b/osu.Game/Rulesets/UI/RulesetContainer.cs index 3a2e66505a..e42e74c245 100644 --- a/osu.Game/Rulesets/UI/RulesetContainer.cs +++ b/osu.Game/Rulesets/UI/RulesetContainer.cs @@ -212,7 +212,7 @@ namespace osu.Game.Rulesets.UI RelativeSizeAxes = Axes.Both; - Beatmap = (Beatmap)workingBeatmap.GetBeatmap(ruleset.RulesetInfo); + Beatmap = (Beatmap)workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo); KeyBindingInputManager = CreateInputManager(); KeyBindingInputManager.RelativeSizeAxes = Axes.Both; diff --git a/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs b/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs index 37693c99e8..fbbe7d5284 100644 --- a/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs +++ b/osu.Game/Tests/Beatmaps/TestWorkingBeatmap.cs @@ -24,7 +24,7 @@ namespace osu.Game.Tests.Beatmaps } private readonly IBeatmap beatmap; - protected override IBeatmap GetBeatmap() => beatmap; + protected override IBeatmap GetPlayableBeatmap() => beatmap; protected override Texture GetBackground() => null; protected override Track GetTrack()