mirror of
https://github.com/osukey/osukey.git
synced 2025-05-31 10:27:26 +09: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; }
|
public DateTimeOffset Date { get; set; }
|
||||||
|
|
||||||
|
[NotMapped, JsonIgnore]
|
||||||
public Dictionary<HitResult, object> Statistics = new Dictionary<HitResult, object>();
|
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>
|
/// <summary>
|
||||||
/// MD5 is kept for legacy support.
|
/// MD5 is kept for legacy support.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user