mirror of
https://github.com/osukey/osukey.git
synced 2025-06-22 03:38:01 +09: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
|
public enum MatchType
|
||||||
{
|
{
|
||||||
|
// used for osu-web deserialization so names shouldn't be changed.
|
||||||
|
|
||||||
Playlists,
|
Playlists,
|
||||||
|
|
||||||
[Description("Head to head")]
|
[Description("Head to head")]
|
||||||
|
@ -64,6 +64,15 @@ namespace osu.Game.Online.Rooms
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public readonly Bindable<MatchType> Type = new Bindable<MatchType>();
|
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]
|
[Cached]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public readonly Bindable<int?> MaxParticipants = new Bindable<int?>();
|
public readonly Bindable<int?> MaxParticipants = new Bindable<int?>();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user