From 83dafb4ef99abd0f12d8525a113be3e78bb8b4f5 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Wed, 24 Sep 2025 14:09:50 +0900 Subject: [PATCH] Fix incorrect default room types --- osu.Game.Tests/Visual/Matchmaking/TestSceneIdleScreen.cs | 3 ++- .../Visual/Matchmaking/TestSceneMatchmakingScreen.cs | 3 +-- .../Visual/Matchmaking/TestSceneMatchmakingScreenStack.cs | 2 +- osu.Game.Tests/Visual/Matchmaking/TestScenePickScreen.cs | 2 +- osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanel.cs | 3 ++- osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanelList.cs | 3 ++- osu.Game.Tests/Visual/Matchmaking/TestSceneResultsScreen.cs | 3 ++- .../Visual/Matchmaking/TestSceneRoundResultsScreen.cs | 2 +- osu.Game.Tests/Visual/Matchmaking/TestSceneStageBubble.cs | 3 ++- osu.Game.Tests/Visual/Matchmaking/TestSceneStageDisplay.cs | 3 ++- osu.Game.Tests/Visual/Matchmaking/TestSceneStageText.cs | 3 ++- osu.Game/Tests/Visual/Multiplayer/MultiplayerTestScene.cs | 4 ++-- 12 files changed, 20 insertions(+), 14 deletions(-) diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneIdleScreen.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneIdleScreen.cs index 49daedb6a3..174a77390e 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestSceneIdleScreen.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneIdleScreen.cs @@ -10,6 +10,7 @@ using osu.Framework.Screens; using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer.MatchTypes.Matchmaking; +using osu.Game.Online.Rooms; using osu.Game.Screens.OnlinePlay.Matchmaking.Screens.Idle; using osu.Game.Tests.Visual.Multiplayer; using osuTK; @@ -26,7 +27,7 @@ namespace osu.Game.Tests.Visual.Matchmaking { base.SetUpSteps(); - AddStep("join room", () => JoinRoom(CreateDefaultRoom())); + AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.Matchmaking))); WaitForJoined(); AddStep("add list", () => diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneMatchmakingScreen.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneMatchmakingScreen.cs index 27de959ff8..2abe9ac08b 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestSceneMatchmakingScreen.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneMatchmakingScreen.cs @@ -35,8 +35,7 @@ namespace osu.Game.Tests.Visual.Matchmaking AddStep("join room", () => { - var room = CreateDefaultRoom(); - room.Type = MatchType.Matchmaking; + var room = CreateDefaultRoom(MatchType.Matchmaking); room.Playlist = Enumerable.Range(1, 50).Select(i => new PlaylistItem(new MultiplayerPlaylistItem { ID = i, diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneMatchmakingScreenStack.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneMatchmakingScreenStack.cs index 24784db472..02c74b1d07 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestSceneMatchmakingScreenStack.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneMatchmakingScreenStack.cs @@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual.Matchmaking AddStep("join room", () => { - var room = CreateDefaultRoom(); + var room = CreateDefaultRoom(MatchType.Matchmaking); room.Playlist = Enumerable.Range(1, 50).Select(i => new PlaylistItem(new MultiplayerPlaylistItem { ID = i, diff --git a/osu.Game.Tests/Visual/Matchmaking/TestScenePickScreen.cs b/osu.Game.Tests/Visual/Matchmaking/TestScenePickScreen.cs index b12fff385b..1c12b4d2d0 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestScenePickScreen.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestScenePickScreen.cs @@ -59,7 +59,7 @@ namespace osu.Game.Tests.Visual.Matchmaking AddStep("join room", () => { - var room = CreateDefaultRoom(); + var room = CreateDefaultRoom(MatchType.Matchmaking); room.Playlist = items; JoinRoom(room); diff --git a/osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanel.cs b/osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanel.cs index f98a6aac99..805e83a76d 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanel.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanel.cs @@ -7,6 +7,7 @@ using osu.Framework.Graphics; using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer.MatchTypes.Matchmaking; +using osu.Game.Online.Rooms; using osu.Game.Screens.OnlinePlay.Matchmaking; using osu.Game.Tests.Visual.Multiplayer; using osu.Game.Users; @@ -21,7 +22,7 @@ namespace osu.Game.Tests.Visual.Matchmaking { base.SetUpSteps(); - AddStep("join room", () => JoinRoom(CreateDefaultRoom())); + AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.Matchmaking))); WaitForJoined(); AddStep("add panel", () => Child = panel = new PlayerPanel(new MultiplayerRoomUser(1) diff --git a/osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanelList.cs b/osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanelList.cs index 17423c9852..5e43a37e07 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanelList.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestScenePlayerPanelList.cs @@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers; using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer.MatchTypes.Matchmaking; +using osu.Game.Online.Rooms; using osu.Game.Screens.OnlinePlay.Matchmaking; using osu.Game.Tests.Visual.Multiplayer; using osuTK; @@ -24,7 +25,7 @@ namespace osu.Game.Tests.Visual.Matchmaking { base.SetUpSteps(); - AddStep("join room", () => JoinRoom(CreateDefaultRoom())); + AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.Matchmaking))); WaitForJoined(); AddStep("add list", () => Child = new Container diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneResultsScreen.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneResultsScreen.cs index 5fd5b1c906..6b3d42694b 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestSceneResultsScreen.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneResultsScreen.cs @@ -8,6 +8,7 @@ using osu.Framework.Screens; using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer.MatchTypes.Matchmaking; +using osu.Game.Online.Rooms; using osu.Game.Rulesets.Scoring; using osu.Game.Screens.OnlinePlay.Matchmaking.Screens.Results; using osu.Game.Tests.Visual.Multiplayer; @@ -23,7 +24,7 @@ namespace osu.Game.Tests.Visual.Matchmaking { base.SetUpSteps(); - AddStep("join room", () => JoinRoom(CreateDefaultRoom())); + AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.Matchmaking))); WaitForJoined(); AddStep("add results screen", () => diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneRoundResultsScreen.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneRoundResultsScreen.cs index e19d228c85..561c994945 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestSceneRoundResultsScreen.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneRoundResultsScreen.cs @@ -25,7 +25,7 @@ namespace osu.Game.Tests.Visual.Matchmaking { base.SetUpSteps(); - AddStep("join room", () => JoinRoom(CreateDefaultRoom())); + AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.Matchmaking))); WaitForJoined(); setupRequestHandler(); diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneStageBubble.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneStageBubble.cs index 6349f01f28..3cac86b14f 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestSceneStageBubble.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneStageBubble.cs @@ -8,6 +8,7 @@ using osu.Framework.Graphics; using osu.Game.Online.Matchmaking; using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer.MatchTypes.Matchmaking; +using osu.Game.Online.Rooms; using osu.Game.Screens.OnlinePlay.Matchmaking; using osu.Game.Tests.Visual.Multiplayer; @@ -19,7 +20,7 @@ namespace osu.Game.Tests.Visual.Matchmaking { base.SetUpSteps(); - AddStep("join room", () => JoinRoom(CreateDefaultRoom())); + AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.Matchmaking))); WaitForJoined(); AddStep("add bubble", () => Child = new StageBubble(MatchmakingStage.RoundWarmupTime, "Next Round") diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneStageDisplay.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneStageDisplay.cs index 87af7577a9..3ec721d432 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestSceneStageDisplay.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneStageDisplay.cs @@ -6,6 +6,7 @@ using NUnit.Framework; using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Game.Online.Multiplayer.MatchTypes.Matchmaking; +using osu.Game.Online.Rooms; using osu.Game.Screens.OnlinePlay.Matchmaking; using osu.Game.Tests.Visual.Multiplayer; @@ -17,7 +18,7 @@ namespace osu.Game.Tests.Visual.Matchmaking { base.SetUpSteps(); - AddStep("join room", () => JoinRoom(CreateDefaultRoom())); + AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.Matchmaking))); WaitForJoined(); AddStep("add bubble", () => Child = new StageDisplay diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneStageText.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneStageText.cs index 2d7f6b4db1..bc465f53a4 100644 --- a/osu.Game.Tests/Visual/Matchmaking/TestSceneStageText.cs +++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneStageText.cs @@ -6,6 +6,7 @@ using NUnit.Framework; using osu.Framework.Extensions; using osu.Framework.Graphics; using osu.Game.Online.Multiplayer.MatchTypes.Matchmaking; +using osu.Game.Online.Rooms; using osu.Game.Screens.OnlinePlay.Matchmaking; using osu.Game.Tests.Visual.Multiplayer; @@ -17,7 +18,7 @@ namespace osu.Game.Tests.Visual.Matchmaking { base.SetUpSteps(); - AddStep("join room", () => JoinRoom(CreateDefaultRoom())); + AddStep("join room", () => JoinRoom(CreateDefaultRoom(MatchType.Matchmaking))); WaitForJoined(); AddStep("create display", () => Child = new StageText diff --git a/osu.Game/Tests/Visual/Multiplayer/MultiplayerTestScene.cs b/osu.Game/Tests/Visual/Multiplayer/MultiplayerTestScene.cs index ac587d3bb2..316e90d7d3 100644 --- a/osu.Game/Tests/Visual/Multiplayer/MultiplayerTestScene.cs +++ b/osu.Game/Tests/Visual/Multiplayer/MultiplayerTestScene.cs @@ -24,12 +24,12 @@ namespace osu.Game.Tests.Visual.Multiplayer public bool RoomJoined => MultiplayerClient.RoomJoined; - protected Room CreateDefaultRoom() + protected Room CreateDefaultRoom(MatchType type = MatchType.HeadToHead) { return new Room { Name = "test name", - Type = MatchType.HeadToHead, + Type = type, Playlist = [ new PlaylistItem(new TestBeatmap(Ruleset.Value).BeatmapInfo)