mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Move online metrics out of BeatmapSetInfo
model
This commit is contained in:
@ -10,7 +10,7 @@ using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
public class APIBeatmap : IBeatmapInfo
|
||||
public class APIBeatmap : IBeatmapInfo, IBeatmapOnlineInfo
|
||||
{
|
||||
[JsonProperty(@"id")]
|
||||
public int OnlineID { get; set; }
|
||||
@ -69,10 +69,10 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
public string DifficultyName { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty(@"failtimes")]
|
||||
private BeatmapMetrics? metrics { get; set; }
|
||||
public BeatmapMetrics? Metrics { get; set; }
|
||||
|
||||
[JsonProperty(@"max_combo")]
|
||||
private int? maxCombo { get; set; }
|
||||
public int? MaxCombo { get; set; }
|
||||
|
||||
public virtual BeatmapInfo ToBeatmapInfo(RulesetStore rulesets)
|
||||
{
|
||||
@ -90,8 +90,8 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
Status = Status,
|
||||
MD5Hash = Checksum,
|
||||
BeatmapSet = set,
|
||||
Metrics = metrics,
|
||||
MaxCombo = maxCombo,
|
||||
Metrics = Metrics,
|
||||
MaxCombo = MaxCombo,
|
||||
BaseDifficulty = new BeatmapDifficulty
|
||||
{
|
||||
DrainRate = drainRate,
|
||||
|
@ -58,8 +58,8 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
[JsonProperty(@"last_updated")]
|
||||
public DateTimeOffset? LastUpdated { get; set; }
|
||||
|
||||
[JsonProperty(@"ratings")]
|
||||
private int[] ratings { get; set; } = Array.Empty<int>();
|
||||
[JsonProperty("ratings")]
|
||||
public int[] Ratings { get; set; } = Array.Empty<int>();
|
||||
|
||||
[JsonProperty(@"track_id")]
|
||||
public int? TrackId { get; set; }
|
||||
@ -128,7 +128,6 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
OnlineBeatmapSetID = OnlineID,
|
||||
Metadata = metadata,
|
||||
Status = Status,
|
||||
Metrics = new BeatmapSetMetrics { Ratings = ratings },
|
||||
OnlineInfo = this
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user