1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 09:49:53 +08:00

Merge pull request #19575 from smoogipoo/solo-score-info-json-cleanup

Clean up SoloScoreInfo serialised output
This commit is contained in:
Dean Herbert
2022-08-04 23:19:21 +09:00
committed by GitHub
Unverified
@@ -102,6 +102,14 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty("pp")]
public double? PP { get; set; }
public bool ShouldSerializeID() => false;
public bool ShouldSerializeUser() => false;
public bool ShouldSerializeBeatmap() => false;
public bool ShouldSerializeBeatmapSet() => false;
public bool ShouldSerializePP() => false;
public bool ShouldSerializeOnlineID() => false;
public bool ShouldSerializeHasReplay() => false;
#endregion
public override string ToString() => $"score_id: {ID} user_id: {UserID}";
@@ -165,7 +173,7 @@ namespace osu.Game.Online.API.Requests.Responses
RulesetID = score.RulesetID,
Passed = score.Passed,
Mods = score.APIMods,
Statistics = score.Statistics,
Statistics = score.Statistics.Where(kvp => kvp.Value != 0).ToDictionary(kvp => kvp.Key, kvp => kvp.Value),
};
public long OnlineID => ID ?? -1;