mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Refactor BeatmapMetadataContainer
and usages to use interface types
This commit is contained in:
@ -2,8 +2,6 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Rulesets;
|
||||
|
||||
namespace osu.Game.Online.API.Requests.Responses
|
||||
{
|
||||
@ -16,17 +14,19 @@ namespace osu.Game.Online.API.Requests.Responses
|
||||
public int PlayCount { get; set; }
|
||||
|
||||
[JsonProperty("beatmap")]
|
||||
private BeatmapInfo beatmapInfo { get; set; }
|
||||
private APIBeatmap beatmap { get; set; }
|
||||
|
||||
[JsonProperty]
|
||||
private APIBeatmapSet beatmapSet { get; set; }
|
||||
|
||||
public BeatmapInfo GetBeatmapInfo(RulesetStore rulesets)
|
||||
public APIBeatmap BeatmapInfo
|
||||
{
|
||||
BeatmapSetInfo setInfo = beatmapSet.ToBeatmapSet(rulesets);
|
||||
beatmapInfo.BeatmapSet = setInfo;
|
||||
beatmapInfo.Metadata = setInfo.Metadata;
|
||||
return beatmapInfo;
|
||||
get
|
||||
{
|
||||
// old osu-web code doesn't nest set.
|
||||
beatmap.BeatmapSet = BeatmapSet;
|
||||
return beatmap;
|
||||
}
|
||||
}
|
||||
|
||||
[JsonProperty("beatmapset")]
|
||||
public APIBeatmapSet BeatmapSet { get; set; }
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user