diff --git a/osu.Game/Rulesets/Scoring/Score.cs b/osu.Game/Rulesets/Scoring/Score.cs index 5d94fde03b..15d8690322 100644 --- a/osu.Game/Rulesets/Scoring/Score.cs +++ b/osu.Game/Rulesets/Scoring/Score.cs @@ -13,18 +13,16 @@ namespace osu.Game.Rulesets.Scoring { public class Score { - [JsonProperty(@"rank")] public ScoreRank Rank { get; set; } [JsonProperty(@"score")] public double TotalScore { get; set; } - [JsonProperty(@"accuracy")] public double Accuracy { get; set; } public double Health { get; set; } = 1; - [JsonProperty(@"combo")] + [JsonProperty(@"max_combo")] public int MaxCombo { get; set; } public int Combo { get; set; } @@ -50,6 +48,37 @@ namespace osu.Game.Rulesets.Scoring [JsonProperty(@"created_at")] public DateTime Date; + [JsonProperty(@"statistics")] + private Dictionary jsonStats + { + set + { + foreach (var kvp in value) + { + string key = kvp.Key; + switch (key) + { + case @"count_300": + key = @"300"; + break; + case @"count_100": + key = @"100"; + break; + case @"count_50": + key = @"50"; + break; + case @"count_miss": + key = @"x"; + break; + default: + continue; + } + + Statistics.Add(key, kvp.Value); + } + } + } + public Dictionary Statistics = new Dictionary(); } } diff --git a/osu.Game/Screens/Ranking/ResultsPageScore.cs b/osu.Game/Screens/Ranking/ResultsPageScore.cs index 88c9da802e..1c2a126211 100644 --- a/osu.Game/Screens/Ranking/ResultsPageScore.cs +++ b/osu.Game/Screens/Ranking/ResultsPageScore.cs @@ -371,8 +371,8 @@ namespace osu.Game.Screens.Ranking [BackgroundDependencyLoader] private void load(TextureStore textures) { - if (user.Cover?.Url != null) - cover.Texture = textures.Get(user.Cover?.Url); + if (!string.IsNullOrEmpty(user.CoverUrl)) + cover.Texture = textures.Get(user.CoverUrl); } } diff --git a/osu.Game/Users/User.cs b/osu.Game/Users/User.cs index 4ce8781964..1361eefcff 100644 --- a/osu.Game/Users/User.cs +++ b/osu.Game/Users/User.cs @@ -13,24 +13,29 @@ namespace osu.Game.Users [JsonProperty(@"username")] public string Username; - //[JsonProperty(@"country")] - [JsonIgnore] + [JsonProperty(@"country_code")] + public string CountryCode; + + [JsonProperty(@"country")] public Country Country; //public Team Team; - [JsonProperty(@"colour")] + [JsonProperty(@"profile_colour")] public string Colour; - [JsonProperty(@"avatarUrl")] + [JsonProperty(@"avatar_url")] public string AvatarUrl; - [JsonProperty(@"cover")] - public UserCover Cover; + [JsonProperty(@"cover_url")] + public string CoverUrl; + + //[JsonProperty(@"cover")] + //public UserCover Cover; public class UserCover { - [JsonProperty(@"customUrl")] + [JsonProperty(@"custom_url")] public string CustomUrl; [JsonProperty(@"url")]