ICommonSession Improvements + Player Filter (#1600)

* Removed IBaseSession, pushed all members down to ICommonSession.

* Pulled all members of client IPlayerSession into ICommonSession.
Marked client IPlayerSession as obsolete, use the base ICommonSession.

* Restricted setter access for properties in ICommonSession, only engine should be setting them.

* Fixed ping implementation on server.

* Moved AttachedEntityUid to ICommonSession.

* Added a shared IPlayerManager and pulled some common properties down to it.

* Added a shared player Filter class that holds a set of recipients in a networked call. Very useful for selecting recipients in a shared context.
This commit is contained in:
Acruid
2021-02-27 20:42:54 -08:00
committed by GitHub
parent d890f168c2
commit 86bfea6bd4
13 changed files with 344 additions and 71 deletions

View File

@@ -14,6 +14,7 @@ using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Network;
using Robust.Shared.Network.Messages;
using Robust.Shared.Players;
using Robust.Shared.Reflection;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
@@ -53,6 +54,11 @@ namespace Robust.Server.Player
[ViewVariables]
private readonly Dictionary<string, NetUserId> _userIdMap = new();
/// <inheritdoc />
public IEnumerable<ICommonSession> NetworkedSessions => _sessions.Values;
/// <inheritdoc />
public IEnumerable<ICommonSession> Sessions => _sessions.Values;
/// <inheritdoc />
[ViewVariables]