mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:52:55 +08:00
Add statistics storage to realm model
This commit is contained in:
parent
3da762e145
commit
638b3d9161
@ -51,6 +51,22 @@ namespace osu.Game.Scoring
|
|||||||
|
|
||||||
public RealmRuleset Ruleset { get; set; } = null!;
|
public RealmRuleset Ruleset { get; set; } = null!;
|
||||||
|
|
||||||
|
[Ignored]
|
||||||
|
public Dictionary<HitResult, int> Statistics
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(StatisticsJson))
|
||||||
|
return new Dictionary<HitResult, int>();
|
||||||
|
|
||||||
|
return JsonConvert.DeserializeObject<Dictionary<HitResult, int>>(StatisticsJson) ?? new Dictionary<HitResult, int>();
|
||||||
|
}
|
||||||
|
set => JsonConvert.SerializeObject(StatisticsJson);
|
||||||
|
}
|
||||||
|
|
||||||
|
[MapTo("Statistics")]
|
||||||
|
public string StatisticsJson { get; set; } = null!;
|
||||||
|
|
||||||
public ScoreRank Rank
|
public ScoreRank Rank
|
||||||
{
|
{
|
||||||
get => (ScoreRank)RankInt;
|
get => (ScoreRank)RankInt;
|
||||||
|
Loading…
Reference in New Issue
Block a user