Move online metrics out of BeatmapInfo model

This commit is contained in:
Dean Herbert
2021-10-25 15:12:11 +09:00
parent 045dd94a6e
commit 20baae9094
10 changed files with 124 additions and 98 deletions

View File

@ -47,10 +47,7 @@ namespace osu.Game.Beatmaps
public BeatmapDifficulty BaseDifficulty { get; set; }
[NotMapped]
public BeatmapMetrics Metrics { get; set; }
[NotMapped]
public BeatmapOnlineInfo OnlineInfo { get; set; }
public IBeatmapOnlineInfo OnlineInfo { get; set; }
[NotMapped]
public int? MaxCombo { get; set; }
@ -192,5 +189,24 @@ namespace osu.Game.Beatmaps
double IBeatmapInfo.StarRating => StarDifficulty;
#endregion
#region Implementation of IBeatmapOnlineInfo
[JsonIgnore]
public int CircleCount => OnlineInfo.CircleCount;
[JsonIgnore]
public int SliderCount => OnlineInfo.SliderCount;
[JsonIgnore]
public int PlayCount => OnlineInfo.PlayCount;
[JsonIgnore]
public int PassCount => OnlineInfo.PassCount;
[JsonIgnore]
public BeatmapMetrics Metrics => OnlineInfo.Metrics;
#endregion
}
}