mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Remove BeatmapSetInfo.OnlineInfo
and all usages
This commit is contained in:
@ -41,13 +41,13 @@ namespace osu.Game.Screens.Select
|
||||
[Resolved]
|
||||
private RulesetStore rulesets { get; set; }
|
||||
|
||||
private BeatmapInfo beatmapInfo;
|
||||
private IBeatmapInfo beatmapInfo;
|
||||
|
||||
private APIFailTimes failTimes;
|
||||
|
||||
private int[] ratings;
|
||||
|
||||
public BeatmapInfo BeatmapInfo
|
||||
public IBeatmapInfo BeatmapInfo
|
||||
{
|
||||
get => beatmapInfo;
|
||||
set
|
||||
@ -56,8 +56,11 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
beatmapInfo = value;
|
||||
|
||||
failTimes = beatmapInfo?.OnlineInfo?.FailTimes;
|
||||
ratings = beatmapInfo?.BeatmapSet?.OnlineInfo?.Ratings;
|
||||
var onlineInfo = beatmapInfo as IBeatmapOnlineInfo;
|
||||
var onlineSetInfo = beatmapInfo.BeatmapSet as IBeatmapSetOnlineInfo;
|
||||
|
||||
failTimes = onlineInfo?.FailTimes;
|
||||
ratings = onlineSetInfo?.Ratings;
|
||||
|
||||
Scheduler.AddOnce(updateStatistics);
|
||||
}
|
||||
@ -178,9 +181,9 @@ namespace osu.Game.Screens.Select
|
||||
private void updateStatistics()
|
||||
{
|
||||
advanced.BeatmapInfo = BeatmapInfo;
|
||||
description.Text = BeatmapInfo?.Version;
|
||||
source.Text = BeatmapInfo?.Metadata?.Source;
|
||||
tags.Text = BeatmapInfo?.Metadata?.Tags;
|
||||
description.Text = BeatmapInfo?.DifficultyName;
|
||||
source.Text = BeatmapInfo?.Metadata.Source;
|
||||
tags.Text = BeatmapInfo?.Metadata.Tags;
|
||||
|
||||
// failTimes may have been previously fetched
|
||||
if (ratings != null && failTimes != null)
|
||||
@ -190,7 +193,7 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
|
||||
// for now, let's early abort if an OnlineBeatmapID is not present (should have been populated at import time).
|
||||
if (BeatmapInfo?.OnlineBeatmapID == null || api.State.Value == APIState.Offline)
|
||||
if (BeatmapInfo == null || BeatmapInfo.OnlineID <= 0 || api.State.Value == APIState.Offline)
|
||||
{
|
||||
updateMetrics();
|
||||
return;
|
||||
|
Reference in New Issue
Block a user