Fix oversight when making interface implementation explicit

This commit is contained in:
Dean Herbert 2022-09-13 19:55:57 +09:00
parent e15a25ea49
commit 94693a4667

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
#nullable disable
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
@ -26,15 +24,17 @@ namespace osu.Game.Screens.Select
{
public class PlaySongSelect : SongSelect, ILeaderboardScoreSource
{
private OsuScreen playerLoader;
private OsuScreen? playerLoader;
[Resolved(CanBeNull = true)]
private INotificationOverlay notifications { get; set; }
private INotificationOverlay? notifications { get; set; }
public override bool AllowExternalScreenChange => true;
protected override UserActivity InitialActivity => new UserActivity.ChoosingBeatmap();
private PlayBeatmapDetailArea playBeatmapDetailArea = null!;
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
@ -46,7 +46,7 @@ namespace osu.Game.Screens.Select
protected override BeatmapDetailArea CreateBeatmapDetailArea()
{
var playBeatmapDetailArea = new PlayBeatmapDetailArea
playBeatmapDetailArea = new PlayBeatmapDetailArea
{
Leaderboard =
{
@ -54,8 +54,6 @@ namespace osu.Game.Screens.Select
}
};
Scores.BindTo(playBeatmapDetailArea.Leaderboard.Scores);
return playBeatmapDetailArea;
}
@ -74,9 +72,9 @@ namespace osu.Game.Screens.Select
return base.OnKeyDown(e);
}
private IReadOnlyList<Mod> modsAtGameplayStart;
private IReadOnlyList<Mod>? modsAtGameplayStart;
private ModAutoplay getAutoplayMod() => Ruleset.Value.CreateInstance().GetAutoplayMod();
private ModAutoplay? getAutoplayMod() => Ruleset.Value.CreateInstance().GetAutoplayMod();
protected override bool OnStart()
{
@ -135,6 +133,6 @@ namespace osu.Game.Screens.Select
}
}
IBindableList<ScoreInfo> ILeaderboardScoreSource.Scores { get; } = new BindableList<ScoreInfo>();
IBindableList<ScoreInfo> ILeaderboardScoreSource.Scores => playBeatmapDetailArea.Leaderboard.Scores;
}
}