Skip to content

Commit

Permalink
Merge pull request #29071 from bdach/wow-this-is-really-missing-quest…
Browse files Browse the repository at this point in the history
…ion-mark

Fix several missing properties on `MultiplayerScore`
  • Loading branch information
peppy committed Jul 25, 2024
2 parents 9790c5a + 3bb30d7 commit 75e9f97
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions osu.Game/Online/Rooms/MultiplayerScore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public class MultiplayerScore
[JsonProperty("statistics")]
public Dictionary<HitResult, int> Statistics = new Dictionary<HitResult, int>();

[JsonProperty("maximum_statistics")]
public Dictionary<HitResult, int> MaximumStatistics = new Dictionary<HitResult, int>();

[JsonProperty("passed")]
public bool Passed { get; set; }

Expand All @@ -58,9 +61,15 @@ public class MultiplayerScore
[JsonProperty("position")]
public int? Position { get; set; }

[JsonProperty("pp")]
public double? PP { get; set; }

[JsonProperty("has_replay")]
public bool HasReplay { get; set; }

[JsonProperty("ranked")]
public bool Ranked { get; set; }

/// <summary>
/// Any scores in the room around this score.
/// </summary>
Expand All @@ -83,13 +92,17 @@ public ScoreInfo CreateScoreInfo(ScoreManager scoreManager, RulesetStore ruleset
MaxCombo = MaxCombo,
BeatmapInfo = beatmap,
Ruleset = rulesets.GetRuleset(playlistItem.RulesetID) ?? throw new InvalidOperationException($"Ruleset with ID of {playlistItem.RulesetID} not found locally"),
Passed = Passed,
Statistics = Statistics,
MaximumStatistics = MaximumStatistics,
User = User,
Accuracy = Accuracy,
Date = EndedAt,
HasOnlineReplay = HasReplay,
Rank = Rank,
Mods = Mods?.Select(m => m.ToMod(rulesetInstance)).ToArray() ?? Array.Empty<Mod>(),
PP = PP,
Ranked = Ranked,
Position = Position,
};

Expand Down

0 comments on commit 75e9f97

Please sign in to comment.