Move metrics to beatmap set

This commit is contained in:
smoogipoo
2019-06-13 16:52:49 +09:00
parent f240a157b2
commit 0a79b444d9
12 changed files with 67 additions and 43 deletions

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using Newtonsoft.Json;
using osu.Game.Beatmaps;
@ -19,9 +20,12 @@ namespace osu.Game.Online.API.Requests.Responses
}
}
public int[] Ratings { get; set; } = Array.Empty<int>();
//and other metrics in the beatmap set.
// Todo: What
[JsonProperty(@"beatmapset")]
private BeatmapMetrics beatmapSet
private BeatmapSetMetrics beatmapSet
{
set => Ratings = value.Ratings;
}

View File

@ -54,6 +54,9 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"last_updated")]
private DateTimeOffset lastUpdated { get; set; }
[JsonProperty(@"ratings")]
private int[] ratings { get; set; }
[JsonProperty(@"user_id")]
private long creatorId
{
@ -70,6 +73,7 @@ namespace osu.Game.Online.API.Requests.Responses
OnlineBeatmapSetID = OnlineBeatmapSetID,
Metadata = this,
Status = Status,
Metrics = new BeatmapSetMetrics { Ratings = ratings },
OnlineInfo = new BeatmapSetOnlineInfo
{
Covers = covers,