mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Revert PlaylistItem.APIBeatmap
to be private
This commit is contained in:
parent
05f1fd4bc9
commit
9f9c960fe3
@ -43,7 +43,7 @@ namespace osu.Game.Online.Rooms
|
||||
public readonly BindableList<Mod> RequiredMods = new BindableList<Mod>();
|
||||
|
||||
[JsonProperty("beatmap")]
|
||||
public APIBeatmap APIBeatmap { get; set; }
|
||||
private APIBeatmap apiBeatmap { get; set; }
|
||||
|
||||
private APIMod[] allowedModsBacking;
|
||||
|
||||
@ -71,7 +71,7 @@ namespace osu.Game.Online.Rooms
|
||||
|
||||
public void MapObjects(RulesetStore rulesets)
|
||||
{
|
||||
Beatmap.Value ??= APIBeatmap;
|
||||
Beatmap.Value ??= apiBeatmap;
|
||||
Ruleset.Value ??= rulesets.GetRuleset(RulesetID);
|
||||
|
||||
Ruleset rulesetInstance = Ruleset.Value.CreateInstance();
|
||||
|
@ -60,10 +60,8 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
Schedule(() =>
|
||||
{
|
||||
var beatmap = playlistItem?.APIBeatmap;
|
||||
|
||||
string? lastCover = (background?.Beatmap?.BeatmapSet as IBeatmapSetOnlineInfo)?.Covers.Cover;
|
||||
string? newCover = beatmap?.BeatmapSet?.Covers.Cover;
|
||||
string? newCover = (background?.Beatmap?.BeatmapSet as IBeatmapSetOnlineInfo)?.Covers.Cover;
|
||||
|
||||
if (lastCover == newCover)
|
||||
return;
|
||||
|
@ -30,7 +30,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
|
||||
private void updateBeatmap()
|
||||
{
|
||||
sprite.Beatmap.Value = Playlist.FirstOrDefault()?.APIBeatmap;
|
||||
sprite.Beatmap.Value = Playlist.FirstOrDefault()?.Beatmap.Value;
|
||||
}
|
||||
|
||||
protected virtual UpdateableBeatmapBackgroundSprite CreateBackgroundSprite() => new UpdateableBeatmapBackgroundSprite(BeatmapSetCoverType) { RelativeSizeAxes = Axes.Both };
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
|
||||
public PlaylistItemBackground(PlaylistItem? playlistItem)
|
||||
{
|
||||
Beatmap = playlistItem?.APIBeatmap;
|
||||
Beatmap = playlistItem?.Beatmap.Value;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Screens.OnlinePlay.Match
|
||||
if (editButton != null)
|
||||
host.BindValueChanged(h => editButton.Alpha = h.NewValue?.Equals(api.LocalUser.Value) == true ? 1 : 0, true);
|
||||
|
||||
SelectedItem.BindValueChanged(item => background.Beatmap.Value = item.NewValue?.APIBeatmap, true);
|
||||
SelectedItem.BindValueChanged(item => background.Beatmap.Value = item.NewValue?.Beatmap.Value, true);
|
||||
}
|
||||
|
||||
protected override Drawable CreateBackground() => background = new BackgroundSprite();
|
||||
|
Loading…
Reference in New Issue
Block a user