1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:47:28 +08:00

RealtimeMultiplayer -> Multiplayer

This commit is contained in:
Dean Herbert 2020-12-25 13:38:11 +09:00
parent 12e4bbdc5b
commit 5d4b73baa5
127 changed files with 260 additions and 265 deletions

View File

@ -4,14 +4,14 @@
using System;
using osu.Framework.Allocation;
using osu.Game.Beatmaps;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets;
using osu.Game.Screens.Multi;
using osu.Game.Users;
namespace osu.Game.Tests.Visual.Multiplayer
{
public abstract class RoomManagerTestScene : MultiplayerTestScene
public abstract class RoomManagerTestScene : RoomTestScene
{
[Cached(Type = typeof(IRoomManager))]
protected TestRoomManager RoomManager { get; } = new TestRoomManager();

View File

@ -3,7 +3,7 @@
using System;
using osu.Framework.Bindables;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Screens.Multi;
namespace osu.Game.Tests.Visual.Multiplayer

View File

@ -13,7 +13,7 @@ using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Overlays;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;

View File

@ -4,7 +4,7 @@
using System;
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Game.Online.Multiplayer.RoomStatuses;
using osu.Game.Online.Rooms.RoomStatuses;
using osu.Game.Screens.Multi.Lounge.Components;
using osu.Game.Users;

View File

@ -6,7 +6,7 @@ using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets.Catch;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi.Lounge.Components;

View File

@ -5,7 +5,7 @@ using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Beatmaps;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Mods;

View File

@ -3,7 +3,7 @@
using NUnit.Framework;
using osu.Game.Beatmaps;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Osu.Mods;
using osu.Game.Screens.Multi.Match.Components;

View File

@ -3,16 +3,15 @@
using NUnit.Framework;
using osu.Game.Screens.Multi.Components;
using osu.Game.Tests.Visual.RealtimeMultiplayer;
using osu.Game.Users;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneRealtimeMultiplayer : RealtimeMultiplayerTestScene
public class TestSceneMultiplayer : MultiplayerTestScene
{
public TestSceneRealtimeMultiplayer()
public TestSceneMultiplayer()
{
var multi = new TestRealtimeMultiplayer();
var multi = new TestMultiplayer();
AddStep("show", () => LoadScreen(multi));
AddUntilStep("wait for loaded", () => multi.IsLoaded);
@ -40,9 +39,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddAssert("room has 1 user", () => Client.Room?.Users.Count == 1);
}
private class TestRealtimeMultiplayer : Screens.Multi.RealtimeMultiplayer.RealtimeMultiplayer
private class TestMultiplayer : Screens.Multi.Multiplayer.Multiplayer
{
protected override RoomManager CreateRoomManager() => new TestRealtimeRoomManager();
protected override RoomManager CreateRoomManager() => new TestMultiplayerRoomManager();
}
}
}

View File

@ -5,21 +5,20 @@ using System.Linq;
using NUnit.Framework;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi.RealtimeMultiplayer;
using osu.Game.Screens.Multi.RealtimeMultiplayer.Match;
using osu.Game.Screens.Multi.Multiplayer;
using osu.Game.Screens.Multi.Multiplayer.Match;
using osu.Game.Tests.Beatmaps;
using osu.Game.Tests.Visual.RealtimeMultiplayer;
using osuTK.Input;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneRealtimeMatchSubScreen : RealtimeMultiplayerTestScene
public class TestSceneMultiplayerMatchSubScreen : MultiplayerTestScene
{
private RealtimeMatchSubScreen screen;
private MultiplayerMatchSubScreen screen;
public TestSceneRealtimeMatchSubScreen()
public TestSceneMultiplayerMatchSubScreen()
: base(false)
{
}
@ -33,14 +32,14 @@ namespace osu.Game.Tests.Visual.Multiplayer
[SetUpSteps]
public void SetupSteps()
{
AddStep("load match", () => LoadScreen(screen = new RealtimeMatchSubScreen(Room)));
AddStep("load match", () => LoadScreen(screen = new MultiplayerMatchSubScreen(Room)));
AddUntilStep("wait for load", () => screen.IsCurrentScreen());
}
[Test]
public void TestSettingValidity()
{
AddAssert("create button not enabled", () => !this.ChildrenOfType<RealtimeMatchSettingsOverlay.CreateOrUpdateButton>().Single().Enabled.Value);
AddAssert("create button not enabled", () => !this.ChildrenOfType<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>().Single().Enabled.Value);
AddStep("set playlist", () =>
{
@ -51,7 +50,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
});
});
AddAssert("create button enabled", () => this.ChildrenOfType<RealtimeMatchSettingsOverlay.CreateOrUpdateButton>().Single().Enabled.Value);
AddAssert("create button enabled", () => this.ChildrenOfType<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>().Single().Enabled.Value);
}
[Test]
@ -68,7 +67,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddStep("click create button", () =>
{
InputManager.MoveMouseTo(this.ChildrenOfType<RealtimeMatchSettingsOverlay.CreateOrUpdateButton>().Single());
InputManager.MoveMouseTo(this.ChildrenOfType<MultiplayerMatchSettingsOverlay.CreateOrUpdateButton>().Single());
InputManager.Click(MouseButton.Left);
});

View File

@ -7,15 +7,14 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Testing;
using osu.Framework.Utils;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Screens.Multi.RealtimeMultiplayer.Participants;
using osu.Game.Tests.Visual.RealtimeMultiplayer;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi.Multiplayer.Participants;
using osu.Game.Users;
using osuTK;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneRealtimeMultiplayerParticipantsList : RealtimeMultiplayerTestScene
public class TestSceneMultiplayerParticipantsList : MultiplayerTestScene
{
[SetUp]
public new void Setup() => Schedule(() =>

View File

@ -10,20 +10,19 @@ using osu.Framework.Platform;
using osu.Framework.Utils;
using osu.Game.Beatmaps;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets;
using osu.Game.Screens.Multi.RealtimeMultiplayer.Match;
using osu.Game.Screens.Multi.Multiplayer.Match;
using osu.Game.Tests.Resources;
using osu.Game.Tests.Visual.RealtimeMultiplayer;
using osu.Game.Users;
using osuTK;
using osuTK.Input;
namespace osu.Game.Tests.Visual.Multiplayer
{
public class TestSceneRealtimeReadyButton : RealtimeMultiplayerTestScene
public class TestSceneMultiplayerReadyButton : MultiplayerTestScene
{
private RealtimeReadyButton button;
private MultiplayerReadyButton button;
private BeatmapManager beatmaps;
private RulesetStore rulesets;
@ -43,7 +42,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap);
Child = button = new RealtimeReadyButton
Child = button = new MultiplayerReadyButton
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,

View File

@ -4,16 +4,15 @@
using NUnit.Framework;
using osu.Framework.Graphics;
using osu.Framework.Testing;
using osu.Game.Online.Multiplayer;
using osu.Game.Tests.Visual.RealtimeMultiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Tests.Visual.Multiplayer
{
[HeadlessTest]
public class TestSceneRealtimeRoomManager : MultiplayerTestScene
public class TestSceneMultiplayerRoomManager : MultiplayerTestScene
{
private TestRealtimeRoomContainer roomContainer;
private TestRealtimeRoomManager roomManager => roomContainer.RoomManager;
private TestMultiplayerRoomContainer roomContainer;
private TestMultiplayerRoomManager roomManager => roomContainer.RoomManager;
[Test]
public void TestPollsInitially()
@ -137,9 +136,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddAssert("multiplayer room joined", () => roomContainer.Client.Room != null);
}
private TestRealtimeRoomManager createRoomManager()
private TestMultiplayerRoomManager createRoomManager()
{
Child = roomContainer = new TestRealtimeRoomContainer
Child = roomContainer = new TestMultiplayerRoomContainer
{
RoomManager =
{

View File

@ -4,8 +4,8 @@
using System;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.RoomStatuses;
using osu.Game.Online.Rooms;
using osu.Game.Online.Rooms.RoomStatuses;
using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Tests.Visual.Multiplayer
@ -40,9 +40,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
}) { MatchingFilter = true },
new DrawableRoom(new Room
{
Name = { Value = "Open (realtime)" },
Name = { Value = "Open" },
Status = { Value = new RoomStatusOpen() },
Category = { Value = RoomCategory.Realtime }
Category = { Value = RoomCategory.Multiplayer }
}) { MatchingFilter = true },
}
};

View File

@ -9,13 +9,13 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Screens.Multi;
using osu.Game.Screens.Multi.Playlists;
namespace osu.Game.Tests.Visual.Playlists
{
public class TestScenePlaylistsMatchSettingsOverlay : MultiplayerTestScene
public class TestScenePlaylistsMatchSettingsOverlay : RoomTestScene
{
[Cached(Type = typeof(IRoomManager))]
private TestRoomManager roomManager = new TestRoomManager();

View File

@ -8,7 +8,7 @@ using osu.Game.Users;
namespace osu.Game.Tests.Visual.Playlists
{
public class TestScenePlaylistsParticipantsList : MultiplayerTestScene
public class TestScenePlaylistsParticipantsList : RoomTestScene
{
[SetUp]
public new void Setup() => Schedule(() =>

View File

@ -15,7 +15,7 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets.Osu;
using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;

View File

@ -12,7 +12,7 @@ using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Osu;
using osu.Game.Screens.Multi;
@ -24,7 +24,7 @@ using osuTK.Input;
namespace osu.Game.Tests.Visual.Playlists
{
public class TestScenePlaylistsRoomSubScreen : MultiplayerTestScene
public class TestScenePlaylistsRoomSubScreen : RoomTestScene
{
protected override bool UseOnlineAPI => true;

View File

@ -3,7 +3,7 @@
using System.Threading.Tasks;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// An interface defining a multiplayer client instance.

View File

@ -3,7 +3,7 @@
using System.Threading.Tasks;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// Interface for an out-of-room multiplayer server.

View File

@ -3,7 +3,7 @@
using System.Threading.Tasks;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// Interface for an in-room multiplayer server.

View File

@ -1,7 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// An interface defining the multiplayer server instance.

View File

@ -5,7 +5,7 @@ using System;
using System.Runtime.Serialization;
using Microsoft.AspNetCore.SignalR;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
[Serializable]
public class InvalidStateChangeException : HubException

View File

@ -5,7 +5,7 @@ using System;
using System.Runtime.Serialization;
using Microsoft.AspNetCore.SignalR;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
[Serializable]
public class InvalidStateException : HubException

View File

@ -15,9 +15,9 @@ using osu.Framework.Bindables;
using osu.Framework.Logging;
using osu.Game.Online.API;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
public class RealtimeMultiplayerClient : StatefulMultiplayerClient
public class MultiplayerClient : StatefulMultiplayerClient
{
public override IBindable<bool> IsConnected => isConnected;
@ -31,7 +31,7 @@ namespace osu.Game.Online.RealtimeMultiplayer
private readonly string endpoint;
public RealtimeMultiplayerClient(EndpointConfiguration endpoints)
public MultiplayerClient(EndpointConfiguration endpoints)
{
endpoint = endpoints.MultiplayerEndpointUrl;
}

View File

@ -9,7 +9,7 @@ using System.Threading;
using Newtonsoft.Json;
using osu.Framework.Allocation;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// A multiplayer room.

View File

@ -9,7 +9,7 @@ using System.Linq;
using JetBrains.Annotations;
using osu.Game.Online.API;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
[Serializable]
public class MultiplayerRoomSettings : IEquatable<MultiplayerRoomSettings>

View File

@ -3,10 +3,10 @@
#nullable enable
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
/// <summary>
/// The current overall state of a realtime multiplayer room.
/// The current overall state of a multiplayer room.
/// </summary>
public enum MultiplayerRoomState
{

View File

@ -7,7 +7,7 @@ using System;
using Newtonsoft.Json;
using osu.Game.Users;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
[Serializable]
public class MultiplayerRoomUser : IEquatable<MultiplayerRoomUser>

View File

@ -1,7 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
public enum MultiplayerUserState
{

View File

@ -5,7 +5,7 @@ using System;
using System.Runtime.Serialization;
using Microsoft.AspNetCore.SignalR;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
[Serializable]
public class NotHostException : HubException

View File

@ -5,7 +5,7 @@ using System;
using System.Runtime.Serialization;
using Microsoft.AspNetCore.SignalR;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
[Serializable]
public class NotJoinedRoomException : HubException

View File

@ -18,13 +18,13 @@ using osu.Game.Extensions;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.RoomStatuses;
using osu.Game.Online.Rooms;
using osu.Game.Online.Rooms.RoomStatuses;
using osu.Game.Rulesets;
using osu.Game.Users;
using osu.Game.Utils;
namespace osu.Game.Online.RealtimeMultiplayer
namespace osu.Game.Online.Multiplayer
{
public abstract class StatefulMultiplayerClient : Component, IMultiplayerClient, IMultiplayerRoomServer
{

View File

@ -3,7 +3,7 @@
using Newtonsoft.Json;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class APICreatedRoom : Room
{

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using Newtonsoft.Json;
using osu.Game.Online.API.Requests.Responses;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class APILeaderboard
{

View File

@ -6,7 +6,7 @@ using osu.Game.Beatmaps;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Rulesets;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class APIPlaylistBeatmap : APIBeatmap
{

View File

@ -3,7 +3,7 @@
using Newtonsoft.Json;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class APIScoreToken
{

View File

@ -6,7 +6,7 @@ using Newtonsoft.Json;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class CreateRoomRequest : APIRequest<APICreatedRoom>
{

View File

@ -5,7 +5,7 @@ using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class CreateRoomScoreRequest : APIRequest<APIScoreToken>
{

View File

@ -4,7 +4,7 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public abstract class GameType
{

View File

@ -6,7 +6,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osuTK;
namespace osu.Game.Online.Multiplayer.GameTypes
namespace osu.Game.Online.Rooms.GameTypes
{
public class GameTypeTag : GameType
{

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osuTK;
namespace osu.Game.Online.Multiplayer.GameTypes
namespace osu.Game.Online.Rooms.GameTypes
{
public class GameTypeTagTeam : GameType
{

View File

@ -6,7 +6,7 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osuTK;
namespace osu.Game.Online.Multiplayer.GameTypes
namespace osu.Game.Online.Rooms.GameTypes
{
public class GameTypeTeamVersus : GameType
{

View File

@ -6,7 +6,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osuTK;
namespace osu.Game.Online.Multiplayer.GameTypes
namespace osu.Game.Online.Rooms.GameTypes
{
public class GameTypePlaylists : GameType
{

View File

@ -4,7 +4,7 @@
using osu.Framework.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Online.Multiplayer.GameTypes
namespace osu.Game.Online.Rooms.GameTypes
{
public class GameTypeVersus : GameType
{

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics.Shapes;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Online.Multiplayer.GameTypes
namespace osu.Game.Online.Rooms.GameTypes
{
public class VersusRow : FillFlowContainer
{

View File

@ -3,7 +3,7 @@
using osu.Game.Online.API;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class GetRoomLeaderboardRequest : APIRequest<APILeaderboard>
{

View File

@ -3,7 +3,7 @@
using osu.Game.Online.API;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class GetRoomRequest : APIRequest<Room>
{

View File

@ -7,7 +7,7 @@ using osu.Framework.IO.Network;
using osu.Game.Online.API;
using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class GetRoomsRequest : APIRequest<List<Room>>
{

View File

@ -8,7 +8,7 @@ using osu.Game.Extensions;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
/// <summary>
/// Returns a list of scores for the specified playlist item.

View File

@ -6,7 +6,7 @@ using JetBrains.Annotations;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
/// <summary>
/// A collection of parameters which should be passed to the index endpoint to fetch the next page.

View File

@ -4,7 +4,7 @@
using JetBrains.Annotations;
using Newtonsoft.Json;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
/// <summary>
/// A <see cref="MultiplayerScores"/> object returned via a <see cref="IndexPlaylistScoresRequest"/>.

View File

@ -5,7 +5,7 @@ using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class JoinRoomRequest : APIRequest
{

View File

@ -13,7 +13,7 @@ using osu.Game.Rulesets.Scoring;
using osu.Game.Scoring;
using osu.Game.Users;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class MultiplayerScore
{

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using Newtonsoft.Json;
using osu.Game.Online.API.Requests;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
/// <summary>
/// An object which contains scores and related data for fetching next pages.

View File

@ -4,7 +4,7 @@
using JetBrains.Annotations;
using Newtonsoft.Json;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
/// <summary>
/// An object which stores scores higher and lower than the user's score.

View File

@ -5,7 +5,7 @@ using System.Net.Http;
using osu.Framework.IO.Network;
using osu.Game.Online.API;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class PartRoomRequest : APIRequest
{

View File

@ -6,7 +6,7 @@ using Humanizer;
using Humanizer.Localisation;
using osu.Framework.Bindables;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public static class PlaylistExtensions
{

View File

@ -10,7 +10,7 @@ using osu.Game.Online.API;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class PlaylistItem : IEquatable<PlaylistItem>
{

View File

@ -7,11 +7,11 @@ using Newtonsoft.Json;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.IO.Serialization.Converters;
using osu.Game.Online.Multiplayer.GameTypes;
using osu.Game.Online.Multiplayer.RoomStatuses;
using osu.Game.Online.Rooms.GameTypes;
using osu.Game.Online.Rooms.RoomStatuses;
using osu.Game.Users;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class Room
{

View File

@ -3,7 +3,7 @@
using System.ComponentModel;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public enum RoomAvailability
{

View File

@ -1,12 +1,12 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public enum RoomCategory
{
Normal,
Spotlight,
Realtime,
Multiplayer,
}
}

View File

@ -1,10 +1,10 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osuTK.Graphics;
using osu.Game.Graphics;
using osuTK.Graphics;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public abstract class RoomStatus
{

View File

@ -4,7 +4,7 @@
using osu.Game.Graphics;
using osuTK.Graphics;
namespace osu.Game.Online.Multiplayer.RoomStatuses
namespace osu.Game.Online.Rooms.RoomStatuses
{
public class RoomStatusEnded : RoomStatus
{

View File

@ -4,7 +4,7 @@
using osu.Game.Graphics;
using osuTK.Graphics;
namespace osu.Game.Online.Multiplayer.RoomStatuses
namespace osu.Game.Online.Rooms.RoomStatuses
{
public class RoomStatusOpen : RoomStatus
{

View File

@ -4,7 +4,7 @@
using osu.Game.Graphics;
using osuTK.Graphics;
namespace osu.Game.Online.Multiplayer.RoomStatuses
namespace osu.Game.Online.Rooms.RoomStatuses
{
public class RoomStatusPlaying : RoomStatus
{

View File

@ -3,7 +3,7 @@
using osu.Game.Online.API;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class ShowPlaylistUserScoreRequest : APIRequest<MultiplayerScore>
{

View File

@ -7,7 +7,7 @@ using osu.Framework.IO.Network;
using osu.Game.Online.API;
using osu.Game.Scoring;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Rooms
{
public class SubmitRoomScoreRequest : APIRequest<MultiplayerScore>
{

View File

@ -31,7 +31,7 @@ using osu.Game.Input;
using osu.Game.Input.Bindings;
using osu.Game.IO;
using osu.Game.Online;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Spectator;
using osu.Game.Overlays;
using osu.Game.Resources;
@ -219,7 +219,7 @@ namespace osu.Game
dependencies.CacheAs(API ??= new APIAccess(LocalConfig, endpoints));
dependencies.CacheAs(spectatorStreaming = new SpectatorStreamingClient(endpoints));
dependencies.CacheAs(multiplayerClient = new RealtimeMultiplayerClient(endpoints));
dependencies.CacheAs(multiplayerClient = new MultiplayerClient(endpoints));
var defaultBeatmap = new DummyWorkingBeatmap(Audio, Textures);

View File

@ -17,7 +17,7 @@ using osu.Game.Online.API;
using osu.Game.Overlays;
using osu.Game.Screens.Backgrounds;
using osu.Game.Screens.Edit;
using osu.Game.Screens.Multi.RealtimeMultiplayer;
using osu.Game.Screens.Multi.Multiplayer;
using osu.Game.Screens.Multi.Playlists;
using osu.Game.Screens.Select;
@ -105,7 +105,7 @@ namespace osu.Game.Screens.Menu
this.Push(new Editor());
},
OnSolo = onSolo,
OnMultiplayer = () => this.Push(new RealtimeMultiplayer()),
OnMultiplayer = () => this.Push(new Multiplayer()),
OnPlaylists = () => this.Push(new PlaylistsMultiplayer()),
OnExit = confirmAndExit,
}

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Components
{

View File

@ -4,7 +4,7 @@
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Screens.Multi.Components

View File

@ -8,7 +8,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Screens.Select;
using osuTK;

View File

@ -1,7 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Components
{

View File

@ -9,7 +9,7 @@ using osu.Framework.Bindables;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Components
{

View File

@ -12,7 +12,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Logging;
using osu.Game.Beatmaps;
using osu.Game.Online.API;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets;
namespace osu.Game.Screens.Multi.Components

View File

@ -6,7 +6,7 @@ using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Game.Online;
using osu.Game.Online.API;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Components
{

View File

@ -8,8 +8,8 @@ using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.RoomStatuses;
using osu.Game.Online.Rooms;
using osu.Game.Online.Rooms.RoomStatuses;
namespace osu.Game.Screens.Multi.Components
{

View File

@ -5,7 +5,7 @@ using System.Collections.Generic;
using System.Threading.Tasks;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Components
{

View File

@ -6,7 +6,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Components
{

View File

@ -7,7 +7,7 @@ using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Containers;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osuTK;
namespace osu.Game.Screens.Multi

View File

@ -21,7 +21,7 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online;
using osu.Game.Online.Chat;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Overlays.BeatmapListing.Panels;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods;

View File

@ -11,7 +11,7 @@ using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi
{

View File

@ -4,7 +4,7 @@
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi
{

View File

@ -17,12 +17,12 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi.Components;
using osuTK;
using osuTK.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Lounge.Components
{
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
private CachedModelDependencyContainer<Room> dependencies;
[Resolved(canBeNull: true)]
private Multiplayer multiplayer { get; set; }
private MultiplayerScreen multiplayer { get; set; }
[Resolved]
private BeatmapManager beatmaps { get; set; }
@ -228,7 +228,7 @@ namespace osu.Game.Screens.Multi.Lounge.Components
private class RoomName : OsuSpriteText
{
[Resolved(typeof(Room), nameof(Online.Multiplayer.Room.Name))]
[Resolved(typeof(Room), nameof(Online.Rooms.Room.Name))]
private Bindable<string> name { get; set; }
[BackgroundDependencyLoader]

View File

@ -15,9 +15,9 @@ using osu.Framework.Threading;
using osu.Game.Extensions;
using osu.Game.Graphics.UserInterface;
using osu.Game.Input.Bindings;
using osu.Game.Online.Multiplayer;
using osuTK;
using osu.Game.Graphics.Cursor;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Lounge.Components
{

View File

@ -10,7 +10,7 @@ using osu.Framework.Input.Events;
using osu.Framework.Screens;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Overlays;
using osu.Game.Screens.Multi.Lounge.Components;
using osu.Game.Screens.Multi.Match;

View File

@ -9,7 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Screens.Multi.Playlists;
using osuTK;

View File

@ -8,8 +8,8 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Multiplayer.GameTypes;
using osu.Game.Online.Rooms;
using osu.Game.Online.Rooms.GameTypes;
using osu.Game.Screens.Multi.Components;
using osuTK;

View File

@ -4,7 +4,7 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Online.Chat;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Match.Components
{

View File

@ -8,7 +8,7 @@ using osu.Framework.Bindables;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Leaderboards;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
namespace osu.Game.Screens.Multi.Match.Components
{

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Screens.Multi.Components;
using osuTK;
using osuTK.Graphics;

View File

@ -10,7 +10,7 @@ using osu.Framework.Bindables;
using osu.Framework.Screens;
using osu.Game.Audio;
using osu.Game.Beatmaps;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Overlays;
using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Play;
@ -36,7 +36,7 @@ namespace osu.Game.Screens.Multi.Match
private BeatmapManager beatmapManager { get; set; }
[Resolved(canBeNull: true)]
protected Multiplayer Multiplayer { get; private set; }
protected MultiplayerScreen Multiplayer { get; private set; }
private IBindable<WeakReference<BeatmapSetInfo>> managerUpdated;

View File

@ -3,12 +3,12 @@
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.Multi.Match.Components;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer
namespace osu.Game.Screens.Multi.Multiplayer
{
public class CreateRealtimeMatchButton : PurpleTriangleButton
public class CreateMultiplayerMatchButton : PurpleTriangleButton
{
[BackgroundDependencyLoader]
private void load(StatefulMultiplayerClient multiplayerClient)

View File

@ -11,12 +11,12 @@ using osu.Framework.Screens;
using osu.Game.Online.API;
using osu.Game.Screens.Multi.Match.Components;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
namespace osu.Game.Screens.Multi.Multiplayer.Match
{
public class BeatmapSelectionControl : MultiplayerComposite
{
[Resolved]
private RealtimeMatchSubScreen matchSubScreen { get; set; }
private MultiplayerMatchSubScreen matchSubScreen { get; set; }
[Resolved]
private IAPIProvider api { get; set; }
@ -49,7 +49,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
RelativeSizeAxes = Axes.X,
Height = 40,
Text = "Select beatmap",
Action = () => matchSubScreen.Push(new RealtimeMatchSongSelect()),
Action = () => matchSubScreen.Push(new MultiplayerMatchSongSelect()),
Alpha = 0
}
}

View File

@ -8,12 +8,12 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.Rooms;
using osuTK;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
namespace osu.Game.Screens.Multi.Multiplayer.Match
{
public class RealtimeMatchFooter : CompositeDrawable
public class MultiplayerMatchFooter : CompositeDrawable
{
public const float HEIGHT = 50;
@ -21,7 +21,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
private readonly Drawable background;
public RealtimeMatchFooter()
public MultiplayerMatchFooter()
{
RelativeSizeAxes = Axes.X;
Height = HEIGHT;
@ -29,7 +29,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
InternalChildren = new[]
{
background = new Box { RelativeSizeAxes = Axes.Both },
new RealtimeReadyButton
new MultiplayerReadyButton
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,

View File

@ -17,9 +17,9 @@ using FontWeight = osu.Game.Graphics.FontWeight;
using OsuColour = osu.Game.Graphics.OsuColour;
using OsuFont = osu.Game.Graphics.OsuFont;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
namespace osu.Game.Screens.Multi.Multiplayer.Match
{
public class RealtimeMatchHeader : MultiplayerComposite
public class MultiplayerMatchHeader : MultiplayerComposite
{
public const float HEIGHT = 50;
@ -32,7 +32,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
[Resolved]
private IAPIProvider api { get; set; }
public RealtimeMatchHeader()
public MultiplayerMatchHeader()
{
RelativeSizeAxes = Axes.X;
Height = HEIGHT;

View File

@ -15,15 +15,15 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Overlays;
using osu.Game.Rulesets;
using osu.Game.Screens.Multi.Match.Components;
using osuTK;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
namespace osu.Game.Screens.Multi.Multiplayer.Match
{
public class RealtimeMatchSettingsOverlay : MatchSettingsOverlay
public class MultiplayerMatchSettingsOverlay : MatchSettingsOverlay
{
[BackgroundDependencyLoader]
private void load()

View File

@ -14,13 +14,13 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
using osu.Game.Online.API;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Screens.Multi.Components;
using osuTK;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
namespace osu.Game.Screens.Multi.Multiplayer.Match
{
public class RealtimeReadyButton : RealtimeRoomComposite
public class MultiplayerReadyButton : MultiplayerRoomComposite
{
public Bindable<PlaylistItem> SelectedItem => button.SelectedItem;
@ -39,7 +39,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer.Match
private int countReady;
public RealtimeReadyButton()
public MultiplayerReadyButton()
{
InternalChild = button = new ButtonWithTrianglesExposed
{

View File

@ -7,13 +7,13 @@ using osu.Framework.Screens;
using osu.Game.Extensions;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osu.Game.Online.RealtimeMultiplayer;
using osu.Game.Online.Rooms;
using osu.Game.Screens.Multi.Components;
using osu.Game.Screens.Multi.Lounge;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer
namespace osu.Game.Screens.Multi.Multiplayer
{
public class RealtimeMultiplayer : Multiplayer
public class Multiplayer : MultiplayerScreen
{
[Resolved]
private StatefulMultiplayerClient client { get; set; }
@ -28,7 +28,7 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
protected override void UpdatePollingRate(bool isIdle)
{
var playlistsManager = (RealtimeRoomManager)RoomManager;
var playlistsManager = (MultiplayerRoomManager)RoomManager;
if (!this.IsCurrentScreen())
{
@ -58,16 +58,16 @@ namespace osu.Game.Screens.Multi.RealtimeMultiplayer
protected override Room CreateNewRoom()
{
var room = new Room { Name = { Value = $"{API.LocalUser}'s awesome room" } };
room.Category.Value = RoomCategory.Realtime;
room.Category.Value = RoomCategory.Multiplayer;
return room;
}
protected override string ScreenTitle => "Multiplayer";
protected override RoomManager CreateRoomManager() => new RealtimeRoomManager();
protected override RoomManager CreateRoomManager() => new MultiplayerRoomManager();
protected override LoungeSubScreen CreateLounge() => new RealtimeLoungeSubScreen();
protected override LoungeSubScreen CreateLounge() => new MultiplayerLoungeSubScreen();
protected override OsuButton CreateNewMultiplayerGameButton() => new CreateRealtimeMatchButton();
protected override OsuButton CreateNewMultiplayerGameButton() => new CreateMultiplayerMatchButton();
}
}

View File

@ -3,9 +3,9 @@
using osu.Game.Screens.Multi.Lounge.Components;
namespace osu.Game.Screens.Multi.RealtimeMultiplayer
namespace osu.Game.Screens.Multi.Multiplayer
{
public class RealtimeFilterControl : FilterControl
public class MultiplayerFilterControl : FilterControl
{
protected override FilterCriteria CreateCriteria()
{

Some files were not shown because too many files have changed in this diff Show More