mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 02:03:22 +08:00
Add GameplayOrder to MultiplayerPlaylistItem
This commit is contained in:
parent
512818648f
commit
ba8af303cc
@ -741,7 +741,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
OwnerID = item.OwnerID,
|
||||
Beatmap = { Value = apiBeatmap },
|
||||
Ruleset = { Value = ruleset },
|
||||
Expired = item.Expired
|
||||
Expired = item.Expired,
|
||||
GameplayOrder = item.GameplayOrder
|
||||
};
|
||||
|
||||
playlistItem.RequiredMods.AddRange(item.RequiredMods.Select(m => m.ToMod(rulesetInstance)));
|
||||
|
@ -39,6 +39,15 @@ namespace osu.Game.Online.Rooms
|
||||
[Key(7)]
|
||||
public bool Expired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The order in which this <see cref="MultiplayerPlaylistItem"/> will be played, starting from 0 and increasing for items which will be played later.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Undefined value for items which are expired.
|
||||
/// </remarks>
|
||||
[Key(8)]
|
||||
public int GameplayOrder { get; set; }
|
||||
|
||||
public MultiplayerPlaylistItem()
|
||||
{
|
||||
}
|
||||
@ -52,6 +61,7 @@ namespace osu.Game.Online.Rooms
|
||||
RequiredMods = item.RequiredMods.Select(m => new APIMod(m)).ToArray();
|
||||
AllowedMods = item.AllowedMods.Select(m => new APIMod(m)).ToArray();
|
||||
Expired = item.Expired;
|
||||
GameplayOrder = item.GameplayOrder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,6 +33,9 @@ namespace osu.Game.Online.Rooms
|
||||
[JsonProperty("expired")]
|
||||
public bool Expired { get; set; }
|
||||
|
||||
[JsonProperty("gameplay_order")]
|
||||
public int GameplayOrder { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public IBindable<bool> Valid => valid;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user