From db05727ec49faf970578237cb1f36b00fa162b0b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 16 Dec 2021 20:11:45 +0900 Subject: [PATCH] Remove unused `includeProtected` parameter --- osu.Game/Beatmaps/BeatmapManager.cs | 15 ++++----------- osu.Game/Screens/Select/SongSelect.cs | 4 ++-- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs index 22871bd332..706160bfb5 100644 --- a/osu.Game/Beatmaps/BeatmapManager.cs +++ b/osu.Game/Beatmaps/BeatmapManager.cs @@ -102,8 +102,6 @@ namespace osu.Game.Beatmaps return GetWorkingBeatmap(imported?.Beatmaps.First()); } - #region Delegation to BeatmapModelManager (methods which previously existed locally). - /// /// Fired when a single difficulty has been hidden. /// @@ -150,19 +148,12 @@ namespace osu.Game.Beatmaps /// Returns a list of all usable s. /// /// A list of available . - public List GetAllUsableBeatmapSets(bool includeProtected = false) + public List GetAllUsableBeatmapSets() { using (var context = contextFactory.CreateContext()) - return context.All().Where(b => !b.DeletePending && (includeProtected || !b.Protected)).ToList(); + return context.All().Where(b => !b.DeletePending).ToList(); } - /// - /// Returns a list of all usable s. Note that files are not populated. TODO: do we still need this? or rather, should we have the non-enumerable version in the first place? - /// - /// Whether to include protected (system) beatmaps. These should not be included for gameplay playable use cases. - /// A list of available . - public IEnumerable GetAllUsableBeatmapSetsEnumerable(bool includeProtected = false) => GetAllUsableBeatmapSets(includeProtected); - /// /// Perform a lookup query on available s. /// @@ -201,6 +192,8 @@ namespace osu.Game.Beatmaps return context.All().Where(query); } + #region Delegation to BeatmapModelManager (methods which previously existed locally). + /// /// Perform a lookup query on available s. /// diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 1aab84183a..54a4c3270d 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -295,7 +295,7 @@ namespace osu.Game.Screens.Select Schedule(() => { // if we have no beatmaps, let's prompt the user to import from over a stable install if he has one. - if (!beatmaps.GetAllUsableBeatmapSetsEnumerable().Any() && DisplayStableImportPrompt) + if (!beatmaps.GetAllUsableBeatmapSets().Any() && DisplayStableImportPrompt) { dialogOverlay.Push(new ImportFromStablePopup(() => { @@ -421,7 +421,7 @@ namespace osu.Game.Screens.Select // A selection may not have been possible with filters applied. // There was possibly a ruleset mismatch. This is a case we can help things along by updating the game-wide ruleset to match. - if (e.NewValue.BeatmapInfo.Ruleset != null && !e.NewValue.BeatmapInfo.Ruleset.Equals(decoupledRuleset.Value)) + if (!e.NewValue.BeatmapInfo.Ruleset.Equals(decoupledRuleset.Value)) { Ruleset.Value = e.NewValue.BeatmapInfo.Ruleset; transferRulesetValue();