From 4be4ed7ab255fe6cff9b6b882e011a26a5ff15ff Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Mon, 5 Feb 2024 23:27:16 +0300 Subject: [PATCH] Add "ranked" attribute to scores --- osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs | 4 ++++ osu.Game/Scoring/ScoreInfo.cs | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs b/osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs index 732da3d5da..42b9d9414f 100644 --- a/osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs +++ b/osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs @@ -115,6 +115,9 @@ public APIBeatmapSet? BeatmapSet [JsonProperty("has_replay")] public bool HasReplay { get; set; } + [JsonProperty("ranked")] + public bool Ranked { get; set; } + // These properties are calculated or not relevant to any external usage. public bool ShouldSerializeID() => false; public bool ShouldSerializeUser() => false; @@ -212,6 +215,7 @@ public ScoreInfo ToScoreInfo(Mod[] mods, IBeatmapInfo? beatmap = null) HasOnlineReplay = HasReplay, Mods = mods, PP = PP, + Ranked = Ranked, }; if (beatmap is BeatmapInfo realmBeatmap) diff --git a/osu.Game/Scoring/ScoreInfo.cs b/osu.Game/Scoring/ScoreInfo.cs index 32e4bbbf29..fd98107792 100644 --- a/osu.Game/Scoring/ScoreInfo.cs +++ b/osu.Game/Scoring/ScoreInfo.cs @@ -107,6 +107,12 @@ public class ScoreInfo : RealmObject, IHasGuidPrimaryKey, IHasRealmFiles, ISoftD public double? PP { get; set; } + /// + /// Whether the performance points in this score is awarded to the player. This is used for online display purposes (see ). + /// + [Ignored] + public bool Ranked { get; set; } + /// /// The online ID of this score. ///