Remove BeatmapMetadata base class from APIBeatmap

This commit is contained in:
Dean Herbert
2021-10-21 21:48:14 +09:00
parent 6dd54a417f
commit fb7cf35481

View File

@ -10,7 +10,7 @@ using osu.Game.Rulesets;
namespace osu.Game.Online.API.Requests.Responses namespace osu.Game.Online.API.Requests.Responses
{ {
public class APIBeatmap : BeatmapMetadata, IBeatmapInfo public class APIBeatmap : IBeatmapInfo
{ {
[JsonProperty(@"id")] [JsonProperty(@"id")]
public int OnlineID { get; set; } public int OnlineID { get; set; }
@ -24,6 +24,9 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty("checksum")] [JsonProperty("checksum")]
public string Checksum { get; set; } = string.Empty; public string Checksum { get; set; } = string.Empty;
[JsonProperty(@"user_id")]
public int AuthorID { get; set; }
[JsonProperty(@"beatmapset")] [JsonProperty(@"beatmapset")]
public APIBeatmapSet? BeatmapSet { get; set; } public APIBeatmapSet? BeatmapSet { get; set; }
@ -75,7 +78,7 @@ namespace osu.Game.Online.API.Requests.Responses
return new BeatmapInfo return new BeatmapInfo
{ {
Metadata = set?.Metadata ?? this, Metadata = set?.Metadata ?? new BeatmapMetadata(),
Ruleset = rulesets.GetRuleset(RulesetID), Ruleset = rulesets.GetRuleset(RulesetID),
StarDifficulty = StarRating, StarDifficulty = StarRating,
OnlineBeatmapID = OnlineID, OnlineBeatmapID = OnlineID,
@ -106,7 +109,7 @@ namespace osu.Game.Online.API.Requests.Responses
#region Implementation of IBeatmapInfo #region Implementation of IBeatmapInfo
public IBeatmapMetadataInfo Metadata => this; public IBeatmapMetadataInfo Metadata => new BeatmapMetadata();
public IBeatmapDifficultyInfo Difficulty => new BeatmapDifficulty public IBeatmapDifficultyInfo Difficulty => new BeatmapDifficulty
{ {