1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 15:52:54 +08:00

Allow watching replay from multi/playlist results screens

This commit is contained in:
Bartłomiej Dach 2023-09-07 11:26:51 +02:00
parent c4af8591a5
commit fb2293821a
No known key found for this signature in database
4 changed files with 10 additions and 4 deletions

View File

@ -189,7 +189,7 @@ namespace osu.Game.Online.API.Requests.Responses
Statistics = Statistics,
MaximumStatistics = MaximumStatistics,
Date = EndedAt,
Hash = HasReplay ? "online" : string.Empty, // TODO: temporary?
HasOnlineReplay = HasReplay,
Mods = mods,
PP = PP,
};

View File

@ -58,6 +58,9 @@ namespace osu.Game.Online.Rooms
[JsonProperty("position")]
public int? Position { get; set; }
[JsonProperty("has_replay")]
public bool HasReplay { get; set; }
/// <summary>
/// Any scores in the room around this score.
/// </summary>
@ -84,7 +87,7 @@ namespace osu.Game.Online.Rooms
User = User,
Accuracy = Accuracy,
Date = EndedAt,
Hash = string.Empty, // todo: temporary?
HasOnlineReplay = HasReplay,
Rank = Rank,
Mods = Mods?.Select(m => m.ToMod(rulesetInstance)).ToArray() ?? Array.Empty<Mod>(),
Position = Position,

View File

@ -94,7 +94,10 @@ namespace osu.Game.Scoring
public double Accuracy { get; set; }
public bool HasReplay => !string.IsNullOrEmpty(Hash);
public bool HasReplay => !string.IsNullOrEmpty(Hash) || HasOnlineReplay;
[Ignored]
public bool HasOnlineReplay { get; set; }
public DateTimeOffset Date { get; set; }

View File

@ -10,7 +10,7 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
public partial class MultiplayerResultsScreen : PlaylistsResultsScreen
{
public MultiplayerResultsScreen(ScoreInfo score, long roomId, PlaylistItem playlistItem)
: base(score, roomId, playlistItem, false, false)
: base(score, roomId, playlistItem, false)
{
}
}