From 967419c9ac8f63d58e32d0f485328fb67a948323 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 22 Dec 2021 17:44:22 +0900 Subject: [PATCH] Remove `BeatmapSetInfo` and `Metadata` from interface There were very few accesses to this, and after realm they should all be done via the `BeatmapInfo`, so let's remove this. --- .../Visual/Navigation/TestSceneScreenNavigation.cs | 4 ++-- osu.Game/Beatmaps/IWorkingBeatmap.cs | 7 +++---- osu.Game/Beatmaps/WorkingBeatmap.cs | 2 -- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs index 48ab643992..75d8e62ca7 100644 --- a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs +++ b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs @@ -157,12 +157,12 @@ namespace osu.Game.Tests.Visual.Navigation AddUntilStep("wait for fail", () => player.HasFailed); AddUntilStep("wait for track stop", () => !Game.MusicController.IsPlaying); - AddAssert("Ensure time before preview point", () => Game.MusicController.CurrentTrack.CurrentTime < beatmap().Metadata.PreviewTime); + AddAssert("Ensure time before preview point", () => Game.MusicController.CurrentTrack.CurrentTime < beatmap().BeatmapInfo.Metadata.PreviewTime); pushEscape(); AddUntilStep("wait for track playing", () => Game.MusicController.IsPlaying); - AddAssert("Ensure time wasn't reset to preview point", () => Game.MusicController.CurrentTrack.CurrentTime < beatmap().Metadata.PreviewTime); + AddAssert("Ensure time wasn't reset to preview point", () => Game.MusicController.CurrentTrack.CurrentTime < beatmap().BeatmapInfo.Metadata.PreviewTime); } [Test] diff --git a/osu.Game/Beatmaps/IWorkingBeatmap.cs b/osu.Game/Beatmaps/IWorkingBeatmap.cs index 717162fd7f..75b2ecff15 100644 --- a/osu.Game/Beatmaps/IWorkingBeatmap.cs +++ b/osu.Game/Beatmaps/IWorkingBeatmap.cs @@ -15,14 +15,13 @@ using osu.Game.Storyboards; namespace osu.Game.Beatmaps { + /// + /// Provides access to the multiple resources offered by a beatmap model (textures, skins, playable beatmaps etc.) + /// public interface IWorkingBeatmap { IBeatmapInfo BeatmapInfo { get; } - IBeatmapSetInfo BeatmapSetInfo { get; } - - IBeatmapMetadataInfo Metadata { get; } - /// /// Whether the Beatmap has finished loading. /// diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs index 1e33219048..e3bb594858 100644 --- a/osu.Game/Beatmaps/WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/WorkingBeatmap.cs @@ -214,8 +214,6 @@ namespace osu.Game.Beatmaps public virtual bool BeatmapLoaded => beatmapLoadTask?.IsCompleted ?? false; IBeatmapInfo IWorkingBeatmap.BeatmapInfo => BeatmapInfo; - IBeatmapMetadataInfo IWorkingBeatmap.Metadata => Metadata; - IBeatmapSetInfo IWorkingBeatmap.BeatmapSetInfo => BeatmapSetInfo; public IBeatmap Beatmap {