mirror of https://github.com/ppy/osu
Add "ranked" attribute to scores
This commit is contained in:
parent
938bbe38b7
commit
4be4ed7ab2
|
@ -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)
|
||||
|
|
|
@ -107,6 +107,12 @@ public class ScoreInfo : RealmObject, IHasGuidPrimaryKey, IHasRealmFiles, ISoftD
|
|||
|
||||
public double? PP { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the performance points in this score is awarded to the player. This is used for online display purposes (see <see cref="SoloScoreInfo.Ranked"/>).
|
||||
/// </summary>
|
||||
[Ignored]
|
||||
public bool Ranked { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The online ID of this score.
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue