mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Remove local APIRoom from test multiplayer client
This commit is contained in:
@ -28,7 +28,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
public override IBindable<bool> IsConnected => isConnected;
|
public override IBindable<bool> IsConnected => isConnected;
|
||||||
private readonly Bindable<bool> isConnected = new Bindable<bool>(true);
|
private readonly Bindable<bool> isConnected = new Bindable<bool>(true);
|
||||||
|
|
||||||
public Room? APIRoom { get; private set; }
|
public new Room? APIRoom => base.APIRoom;
|
||||||
|
|
||||||
public Action<MultiplayerRoom>? RoomSetupAction;
|
public Action<MultiplayerRoom>? RoomSetupAction;
|
||||||
|
|
||||||
@ -138,6 +138,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
RequiredMods = apiRoom.Playlist.Last().RequiredMods.Select(m => new APIMod(m)).ToArray(),
|
RequiredMods = apiRoom.Playlist.Last().RequiredMods.Select(m => new APIMod(m)).ToArray(),
|
||||||
AllowedMods = apiRoom.Playlist.Last().AllowedMods.Select(m => new APIMod(m)).ToArray(),
|
AllowedMods = apiRoom.Playlist.Last().AllowedMods.Select(m => new APIMod(m)).ToArray(),
|
||||||
PlaylistItemId = apiRoom.Playlist.Last().ID,
|
PlaylistItemId = apiRoom.Playlist.Last().ID,
|
||||||
|
// ReSharper disable once ConstantNullCoalescingCondition Incorrect inspection due to lack of nullable in Room.cs.
|
||||||
Password = password ?? string.Empty,
|
Password = password ?? string.Empty,
|
||||||
},
|
},
|
||||||
Users = { localUser },
|
Users = { localUser },
|
||||||
@ -147,16 +148,10 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
RoomSetupAction?.Invoke(room);
|
RoomSetupAction?.Invoke(room);
|
||||||
RoomSetupAction = null;
|
RoomSetupAction = null;
|
||||||
|
|
||||||
APIRoom = apiRoom;
|
|
||||||
|
|
||||||
return Task.FromResult(room);
|
return Task.FromResult(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Task LeaveRoomInternal()
|
protected override Task LeaveRoomInternal() => Task.CompletedTask;
|
||||||
{
|
|
||||||
APIRoom = null;
|
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override Task TransferHost(int userId) => ((IMultiplayerClient)this).HostChanged(userId);
|
public override Task TransferHost(int userId) => ((IMultiplayerClient)this).HostChanged(userId);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user