mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 21:57:24 +09:00
Make Room
opt-in rather than opt-out for json serialization
This commit is contained in:
parent
28c9c5ab6a
commit
f14a9af801
@ -15,6 +15,7 @@ using osu.Game.Utils;
|
|||||||
|
|
||||||
namespace osu.Game.Online.Rooms
|
namespace osu.Game.Online.Rooms
|
||||||
{
|
{
|
||||||
|
[JsonObject(MemberSerialization.OptIn)]
|
||||||
public class Room : IDeepCloneable<Room>
|
public class Room : IDeepCloneable<Room>
|
||||||
{
|
{
|
||||||
[Cached]
|
[Cached]
|
||||||
@ -49,7 +50,6 @@ namespace osu.Game.Online.Rooms
|
|||||||
public readonly Bindable<RoomDifficultyRange> DifficultyRange = new Bindable<RoomDifficultyRange>();
|
public readonly Bindable<RoomDifficultyRange> DifficultyRange = new Bindable<RoomDifficultyRange>();
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[JsonIgnore]
|
|
||||||
public readonly Bindable<RoomCategory> Category = new Bindable<RoomCategory>();
|
public readonly Bindable<RoomCategory> Category = new Bindable<RoomCategory>();
|
||||||
|
|
||||||
// Todo: osu-framework bug (https://github.com/ppy/osu-framework/issues/4106)
|
// Todo: osu-framework bug (https://github.com/ppy/osu-framework/issues/4106)
|
||||||
@ -62,19 +62,15 @@ namespace osu.Game.Online.Rooms
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[JsonIgnore]
|
|
||||||
public readonly Bindable<int?> MaxAttempts = new Bindable<int?>();
|
public readonly Bindable<int?> MaxAttempts = new Bindable<int?>();
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[JsonIgnore]
|
|
||||||
public readonly Bindable<RoomStatus> Status = new Bindable<RoomStatus>(new RoomStatusOpen());
|
public readonly Bindable<RoomStatus> Status = new Bindable<RoomStatus>(new RoomStatusOpen());
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[JsonIgnore]
|
|
||||||
public readonly Bindable<RoomAvailability> Availability = new Bindable<RoomAvailability>();
|
public readonly Bindable<RoomAvailability> Availability = new Bindable<RoomAvailability>();
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[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)
|
// Todo: osu-framework bug (https://github.com/ppy/osu-framework/issues/4106)
|
||||||
@ -87,7 +83,6 @@ namespace osu.Game.Online.Rooms
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[JsonIgnore]
|
|
||||||
public readonly Bindable<QueueMode> QueueMode = new Bindable<QueueMode>();
|
public readonly Bindable<QueueMode> QueueMode = new Bindable<QueueMode>();
|
||||||
|
|
||||||
[JsonConverter(typeof(SnakeCaseStringEnumConverter))]
|
[JsonConverter(typeof(SnakeCaseStringEnumConverter))]
|
||||||
@ -99,7 +94,6 @@ namespace osu.Game.Online.Rooms
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[JsonIgnore]
|
|
||||||
public readonly Bindable<int?> MaxParticipants = new Bindable<int?>();
|
public readonly Bindable<int?> MaxParticipants = new Bindable<int?>();
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
@ -124,7 +118,6 @@ namespace osu.Game.Online.Rooms
|
|||||||
public readonly Bindable<string> Password = new Bindable<string>();
|
public readonly Bindable<string> Password = new Bindable<string>();
|
||||||
|
|
||||||
[Cached]
|
[Cached]
|
||||||
[JsonIgnore]
|
|
||||||
public readonly Bindable<TimeSpan?> Duration = new Bindable<TimeSpan?>();
|
public readonly Bindable<TimeSpan?> Duration = new Bindable<TimeSpan?>();
|
||||||
|
|
||||||
[JsonProperty("duration")]
|
[JsonProperty("duration")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user