Handle API returned difficulty range for rooms

This commit is contained in:
Dean Herbert
2022-02-17 19:15:09 +09:00
parent 7f4cc221d2
commit 39d64e779c
2 changed files with 31 additions and 3 deletions

View File

@ -37,6 +37,9 @@ namespace osu.Game.Online.Rooms
[JsonProperty("channel_id")]
public readonly Bindable<int> ChannelId = new Bindable<int>();
[JsonProperty("difficulty_range")]
public readonly Bindable<RoomDifficultyRange> DifficultyRange = new Bindable<RoomDifficultyRange>();
[Cached]
[JsonIgnore]
public readonly Bindable<RoomCategory> Category = new Bindable<RoomCategory>();
@ -228,5 +231,15 @@ namespace osu.Game.Online.Rooms
public bool ShouldSerializeEndDate() => false;
#endregion
[JsonObject(MemberSerialization.OptIn)]
public class RoomDifficultyRange
{
[JsonProperty("min")]
public double Min;
[JsonProperty("max")]
public double Max;
}
}
}