mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 08:27:23 +08:00
Fix score statistics not being serialised
This commit is contained in:
parent
5530736541
commit
690a1f0765
@ -71,8 +71,21 @@ namespace osu.Game.Scoring
|
||||
|
||||
public DateTimeOffset Date { get; set; }
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public Dictionary<HitResult, object> Statistics = new Dictionary<HitResult, object>();
|
||||
|
||||
public string StatisticsString
|
||||
{
|
||||
get => JsonConvert.SerializeObject(Statistics);
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
return;
|
||||
|
||||
Statistics = JsonConvert.DeserializeObject<Dictionary<HitResult, object>>(value);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MD5 is kept for legacy support.
|
||||
/// </summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user