mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 11:12:54 +08:00
Serialise type
as snake_case
This commit is contained in:
parent
6442d86407
commit
e11b815b82
@ -7,6 +7,8 @@ namespace osu.Game.Online.Rooms
|
||||
{
|
||||
public enum MatchType
|
||||
{
|
||||
// used for osu-web deserialization so names shouldn't be changed.
|
||||
|
||||
Playlists,
|
||||
|
||||
[Description("Head to head")]
|
||||
|
@ -64,6 +64,15 @@ namespace osu.Game.Online.Rooms
|
||||
[JsonIgnore]
|
||||
public readonly Bindable<MatchType> Type = new Bindable<MatchType>();
|
||||
|
||||
// Todo: osu-framework bug (https://github.com/ppy/osu-framework/issues/4106)
|
||||
[JsonConverter(typeof(SnakeCaseStringEnumConverter))]
|
||||
[JsonProperty("type")]
|
||||
private MatchType type
|
||||
{
|
||||
get => Type.Value;
|
||||
set => Type.Value = value;
|
||||
}
|
||||
|
||||
[Cached]
|
||||
[JsonIgnore]
|
||||
public readonly Bindable<int?> MaxParticipants = new Bindable<int?>();
|
||||
|
Loading…
Reference in New Issue
Block a user