diff --git a/osu.Game/Online/Multiplayer/Room.cs b/osu.Game/Online/Multiplayer/Room.cs index 4af92f68ea..e2322db397 100644 --- a/osu.Game/Online/Multiplayer/Room.cs +++ b/osu.Game/Online/Multiplayer/Room.cs @@ -35,8 +35,16 @@ public class Room [JsonProperty("duration")] public readonly Bindable Duration = new Bindable(100); - [JsonProperty("max_attempts")] - public readonly Bindable MaxAttempts = new Bindable(null); + [JsonIgnore] + public readonly Bindable MaxAttempts = new Bindable(); + + // Todo: Find a better way to do this (https://github.com/ppy/osu-framework/issues/1930) + [JsonProperty("max_attempts", DefaultValueHandling = DefaultValueHandling.Ignore)] + private int? maxAttempts + { + get => MaxAttempts; + set => MaxAttempts.Value = value; + } public Bindable Status = new Bindable(new RoomStatusOpen()); public Bindable Availability = new Bindable();