1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-14 02:23:21 +08:00

Merge pull request #25746 from smoogipoo/add-islegacyscore

Add `IsLegacyScore` to `SoloScoreInfo`
This commit is contained in:
Dean Herbert 2023-12-13 16:15:20 +09:00 committed by GitHub
commit a61dfa48bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,6 +150,12 @@ namespace osu.Game.Online.API.Requests.Responses
#endregion
/// <summary>
/// Whether this <see cref="ScoreInfo"/> represents a legacy (osu!stable) score.
/// </summary>
[JsonIgnore]
public bool IsLegacyScore => LegacyScoreId != null;
public override string ToString() => $"score_id: {ID} user_id: {UserID}";
/// <summary>
@ -191,6 +197,7 @@ namespace osu.Game.Online.API.Requests.Responses
{
OnlineID = OnlineID,
LegacyOnlineID = (long?)LegacyScoreId ?? -1,
IsLegacyScore = IsLegacyScore,
User = User ?? new APIUser { Id = UserID },
BeatmapInfo = new BeatmapInfo { OnlineID = BeatmapID },
Ruleset = new RulesetInfo { OnlineID = RulesetID },