mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 14:52:35 +02:00
* Adds the SoundSystem static proxy class for the AudioSystem. Added a shared IAudioSystem interface for the future. * Moved ConnectedClient property from IPlayerSession down to ICommonSession. * Connected up the SoundSystem to the client/server AudioSystems. * Converted client calls over to the new system. * Marked the old serverside functions to play sound obsolete, use the new ones from the IAudioSystem. * Added ISharedPlayerManager to the IoC registration.
61 lines
1.5 KiB
C#
61 lines
1.5 KiB
C#
using Robust.Shared.Enums;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.Network;
|
|
using Robust.Shared.Players;
|
|
|
|
namespace Robust.Client.Player
|
|
{
|
|
internal sealed class PlayerSession : IPlayerSession
|
|
{
|
|
/// <inheritdoc />
|
|
internal SessionStatus Status { get; set; } = SessionStatus.Connecting;
|
|
|
|
/// <inheritdoc />
|
|
SessionStatus ICommonSession.Status
|
|
{
|
|
get => this.Status;
|
|
set => this.Status = value;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public IEntity? AttachedEntity { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public EntityUid? AttachedEntityUid => AttachedEntity?.Uid;
|
|
|
|
/// <inheritdoc />
|
|
public NetUserId UserId { get; }
|
|
|
|
/// <inheritdoc cref="IPlayerSession" />
|
|
internal string Name { get; set; } = "<Unknown>";
|
|
|
|
/// <inheritdoc cref="IPlayerSession" />
|
|
string ICommonSession.Name
|
|
{
|
|
get => this.Name;
|
|
set => this.Name = value;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
internal short Ping { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public INetChannel ConnectedClient { get; internal set; } = null!;
|
|
|
|
/// <inheritdoc />
|
|
short ICommonSession.Ping
|
|
{
|
|
get => this.Ping;
|
|
set => this.Ping = value;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Creates an instance of a PlayerSession.
|
|
/// </summary
|
|
public PlayerSession(NetUserId user)
|
|
{
|
|
UserId = user;
|
|
}
|
|
}
|
|
}
|