Add beatmap availability change state & event methods

This commit is contained in:
Salman Ahmed
2021-01-03 04:32:50 +03:00
parent 09e5e2629a
commit dfa8be9173
5 changed files with 60 additions and 0 deletions

View File

@ -14,6 +14,7 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Logging;
using osu.Game.Online.API;
using osu.Game.Online.Rooms;
namespace osu.Game.Online.Multiplayer
{
@ -173,6 +174,14 @@ namespace osu.Game.Online.Multiplayer
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeState), newState);
}
public override Task ChangeBeatmapAvailability(BeatmapAvailability newBeatmapAvailability)
{
if (!isConnected.Value)
return Task.CompletedTask;
return connection.InvokeAsync(nameof(IMultiplayerServer.ChangeBeatmapAvailability), newBeatmapAvailability);
}
public override Task StartMatch()
{
if (!isConnected.Value)