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