diff --git a/Robust.Client/Graphics/Overlays/OverlayManager.cs b/Robust.Client/Graphics/Overlays/OverlayManager.cs index c7b123a06..5bb32c710 100644 --- a/Robust.Client/Graphics/Overlays/OverlayManager.cs +++ b/Robust.Client/Graphics/Overlays/OverlayManager.cs @@ -4,6 +4,7 @@ using System.Diagnostics.CodeAnalysis; using Robust.Shared.IoC; using Robust.Shared.Log; using Robust.Shared.Timing; +using Robust.Shared.ViewVariables; namespace Robust.Client.Graphics { @@ -11,6 +12,7 @@ namespace Robust.Client.Graphics { [Dependency] private readonly ILogManager _logMan = default!; + [ViewVariables] private readonly Dictionary _overlays = new Dictionary(); private ISawmill _logger = default!; diff --git a/Robust.Client/Player/IPlayerManager.cs b/Robust.Client/Player/IPlayerManager.cs index d65c0e2ca..af71a6969 100644 --- a/Robust.Client/Player/IPlayerManager.cs +++ b/Robust.Client/Player/IPlayerManager.cs @@ -3,14 +3,18 @@ using System.Collections.Generic; using Robust.Shared.GameStates; using Robust.Shared.Network; using Robust.Shared.Players; +using Robust.Shared.ViewVariables; namespace Robust.Client.Player { public interface IPlayerManager : Shared.Players.ISharedPlayerManager { new IEnumerable Sessions { get; } + + [ViewVariables] IReadOnlyDictionary SessionsDict { get; } + [ViewVariables] LocalPlayer? LocalPlayer { get; } /// diff --git a/Robust.Client/Player/PlayerSession.cs b/Robust.Client/Player/PlayerSession.cs index ebc752c58..074edb3a3 100644 --- a/Robust.Client/Player/PlayerSession.cs +++ b/Robust.Client/Player/PlayerSession.cs @@ -2,6 +2,7 @@ using Robust.Shared.Enums; using Robust.Shared.GameObjects; using Robust.Shared.Network; using Robust.Shared.Players; +using Robust.Shared.ViewVariables; namespace Robust.Client.Player { @@ -17,11 +18,14 @@ namespace Robust.Client.Player } /// + [ViewVariables] public EntityUid? AttachedEntity { get; set; } /// + [ViewVariables] public NetUserId UserId { get; } + [ViewVariables] internal string Name { get; set; } = ""; /// @@ -31,9 +35,11 @@ namespace Robust.Client.Player set => this.Name = value; } + [ViewVariables] internal short Ping { get; set; } /// + [ViewVariables] public INetChannel ConnectedClient { get; internal set; } = null!; /// diff --git a/Robust.Shared/Network/INetChannel.cs b/Robust.Shared/Network/INetChannel.cs index 7b6b67063..802d1bdd6 100644 --- a/Robust.Shared/Network/INetChannel.cs +++ b/Robust.Shared/Network/INetChannel.cs @@ -1,5 +1,6 @@ using System; using System.Net; +using Robust.Shared.ViewVariables; namespace Robust.Shared.Network { @@ -28,10 +29,13 @@ namespace Robust.Shared.Network /// On the server, this is the session ID for this client. /// On the client, this is the session ID for the client. /// + [ViewVariables] NetUserId UserId { get; } + [ViewVariables] string UserName { get; } + [ViewVariables] LoginType AuthType { get; } /// @@ -47,11 +51,13 @@ namespace Robust.Shared.Network /// /// Average round trip time in milliseconds between the remote peer and us. /// + [ViewVariables] short Ping { get; } /// /// Whether or not the channel is currently connected to a remote peer. /// + [ViewVariables] bool IsConnected { get; } NetUserData UserData { get; }