From f637e0e5a73c356cccf03580cee858c9a737996f Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 30 Jan 2020 18:08:34 +0900 Subject: [PATCH] Remove unused bypassScreenAllowChecks argument --- osu.Game/OsuGame.cs | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index f54e6c02af..374bacde00 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -344,7 +344,7 @@ namespace osu.Game Ruleset.Value = first.Ruleset; Beatmap.Value = BeatmapManager.GetWorkingBeatmap(first); - }, $"load {beatmap}", bypassScreenAllowChecks: true, validScreens: new[] { typeof(PlaySongSelect) }); + }, $"load {beatmap}", validScreens: new[] { typeof(PlaySongSelect) }); } /// @@ -386,7 +386,7 @@ namespace osu.Game Beatmap.Value = BeatmapManager.GetWorkingBeatmap(databasedBeatmap); screen.Push(new ReplayPlayerLoader(databasedScore)); - }, $"watch {databasedScoreInfo}", bypassScreenAllowChecks: true); + }, $"watch {databasedScoreInfo}"); } protected virtual Loader CreateLoader() => new Loader(); @@ -447,30 +447,13 @@ namespace osu.Game /// The action to perform once we are in the correct state. /// The task name to display in a notification (if we can't immediately reach the main menu state). /// An optional collection of valid screen types. If any of these screens are already current we can immediately perform the action immediately, else the first valid parent will be made current before performing the action. is used if not specified. - /// Whether checking should be bypassed. - private void performFromScreen(Action action, string taskName, IEnumerable validScreens = null, bool bypassScreenAllowChecks = false) + private void performFromScreen(Action action, string taskName, IEnumerable validScreens = null) { performFromMainMenuTask?.Cancel(); validScreens ??= Enumerable.Empty(); validScreens = validScreens.Append(typeof(MainMenu)); - // if the current screen does not allow screen changing, give the user an option to try again later. - if (!bypassScreenAllowChecks && (ScreenStack.CurrentScreen as IOsuScreen)?.AllowExternalScreenChange == false) - { - notifications.Post(new SimpleNotification - { - Text = $"Click here to {taskName}", - Activated = () => - { - performFromScreen(action, taskName, validScreens, true); - return true; - } - }); - - return; - } - CloseAllOverlays(false); // we may already be at the target screen type.