mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:32:55 +08:00
Fix dependency missing in a few TestScenes
Hopefully these are rather temporary cases until a better solution is found for these dependency-loading screens.
This commit is contained in:
parent
48f280440c
commit
a87d8d0359
@ -18,6 +18,7 @@ using osu.Framework.Utils;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Overlays.Mods;
|
using osu.Game.Overlays.Mods;
|
||||||
@ -34,6 +35,7 @@ using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
|
|||||||
using osu.Game.Screens.Play;
|
using osu.Game.Screens.Play;
|
||||||
using osu.Game.Screens.Ranking;
|
using osu.Game.Screens.Ranking;
|
||||||
using osu.Game.Tests.Resources;
|
using osu.Game.Tests.Resources;
|
||||||
|
using osu.Game.Tests.Visual.OnlinePlay;
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
|
|
||||||
@ -617,10 +619,19 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
[Cached(typeof(MultiplayerClient))]
|
[Cached(typeof(MultiplayerClient))]
|
||||||
public readonly TestMultiplayerClient Client;
|
public readonly TestMultiplayerClient Client;
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
public readonly TestRoomRequestsHandler RequestsHandler = new TestRoomRequestsHandler();
|
||||||
|
|
||||||
public DependenciesScreen(TestMultiplayerClient client)
|
public DependenciesScreen(TestMultiplayerClient client)
|
||||||
{
|
{
|
||||||
Client = client;
|
Client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(IAPIProvider api, OsuGameBase game)
|
||||||
|
{
|
||||||
|
((DummyAPIAccess)api).HandleRequest = request => RequestsHandler.HandleRequest(request, api.LocalUser.Value, game);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestMultiplayer : Screens.OnlinePlay.Multiplayer.Multiplayer
|
private class TestMultiplayer : Screens.OnlinePlay.Multiplayer.Multiplayer
|
||||||
|
@ -11,6 +11,7 @@ using osu.Framework.Platform;
|
|||||||
using osu.Framework.Testing;
|
using osu.Framework.Testing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Database;
|
using osu.Game.Database;
|
||||||
|
using osu.Game.Online.API;
|
||||||
using osu.Game.Online.Multiplayer;
|
using osu.Game.Online.Multiplayer;
|
||||||
using osu.Game.Online.Multiplayer.MatchTypes.TeamVersus;
|
using osu.Game.Online.Multiplayer.MatchTypes.TeamVersus;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
@ -23,6 +24,7 @@ using osu.Game.Screens.OnlinePlay.Multiplayer;
|
|||||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
|
using osu.Game.Screens.OnlinePlay.Multiplayer.Match;
|
||||||
using osu.Game.Screens.OnlinePlay.Multiplayer.Participants;
|
using osu.Game.Screens.OnlinePlay.Multiplayer.Participants;
|
||||||
using osu.Game.Tests.Resources;
|
using osu.Game.Tests.Resources;
|
||||||
|
using osu.Game.Tests.Visual.OnlinePlay;
|
||||||
using osuTK.Input;
|
using osuTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual.Multiplayer
|
namespace osu.Game.Tests.Visual.Multiplayer
|
||||||
@ -176,10 +178,19 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
[Cached(typeof(MultiplayerClient))]
|
[Cached(typeof(MultiplayerClient))]
|
||||||
public readonly TestMultiplayerClient Client;
|
public readonly TestMultiplayerClient Client;
|
||||||
|
|
||||||
|
[Cached]
|
||||||
|
public readonly TestRoomRequestsHandler RequestsHandler = new TestRoomRequestsHandler();
|
||||||
|
|
||||||
public DependenciesScreen(TestMultiplayerClient client)
|
public DependenciesScreen(TestMultiplayerClient client)
|
||||||
{
|
{
|
||||||
Client = client;
|
Client = client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load(IAPIProvider api, OsuGameBase game)
|
||||||
|
{
|
||||||
|
((DummyAPIAccess)api).HandleRequest = request => RequestsHandler.HandleRequest(request, api.LocalUser.Value, game);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TestMultiplayer : Screens.OnlinePlay.Multiplayer.Multiplayer
|
private class TestMultiplayer : Screens.OnlinePlay.Multiplayer.Multiplayer
|
||||||
|
Loading…
Reference in New Issue
Block a user