mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Make TestRoomManager update existing room
This commit is contained in:
@ -38,7 +38,13 @@ namespace osu.Game.Tests.Visual.OnlinePlay
|
||||
|
||||
public void AddOrUpdateRoom(Room room)
|
||||
{
|
||||
Rooms.Add(room);
|
||||
var existing = Rooms.FirstOrDefault(r => r.RoomID.Value != null && r.RoomID.Value == room.RoomID.Value);
|
||||
|
||||
if (existing != null)
|
||||
existing.CopyFrom(room);
|
||||
else
|
||||
Rooms.Add(room);
|
||||
|
||||
RoomsUpdated?.Invoke();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user