diff --git a/Content.Client/GameObjects/Components/Construction/ConstructionGhostComponent.cs b/Content.Client/GameObjects/Components/Construction/ConstructionGhostComponent.cs index 9c0633e859..17d29e2f69 100644 --- a/Content.Client/GameObjects/Components/Construction/ConstructionGhostComponent.cs +++ b/Content.Client/GameObjects/Components/Construction/ConstructionGhostComponent.cs @@ -2,6 +2,7 @@ using Content.Shared.Construction; using SS14.Shared.GameObjects; using SS14.Shared.Interfaces.GameObjects; using SS14.Shared.Interfaces.Network; +using SS14.Shared.ViewVariables; namespace Content.Client.GameObjects.Components.Construction { @@ -9,11 +10,12 @@ namespace Content.Client.GameObjects.Components.Construction { public override string Name => "ConstructionGhost"; - public ConstructionPrototype Prototype { get; set; } - public ConstructorComponent Master { get; set; } - public int GhostID { get; set; } + [ViewVariables] public ConstructionPrototype Prototype { get; set; } + [ViewVariables] public ConstructorComponent Master { get; set; } + [ViewVariables] public int GhostID { get; set; } - public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null) + public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, + IComponent component = null) { base.HandleMessage(message, netChannel, component); diff --git a/Content.Client/GameObjects/Components/Items/ClientHandsComponent.cs b/Content.Client/GameObjects/Components/Items/ClientHandsComponent.cs index 5835107fff..cd23649a67 100644 --- a/Content.Client/GameObjects/Components/Items/ClientHandsComponent.cs +++ b/Content.Client/GameObjects/Components/Items/ClientHandsComponent.cs @@ -6,12 +6,14 @@ using SS14.Shared.GameObjects; using SS14.Shared.Interfaces.GameObjects; using SS14.Shared.IoC; using System.Collections.Generic; +using SS14.Shared.ViewVariables; namespace Content.Client.GameObjects { public class HandsComponent : SharedHandsComponent, IHandsComponent { private readonly Dictionary hands = new Dictionary(); + [ViewVariables] public string ActiveIndex { get; private set; } public IEntity GetEntity(string index) diff --git a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs index 8be61a50b2..18b1a47192 100644 --- a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs +++ b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs @@ -11,6 +11,7 @@ using SS14.Shared.GameObjects; using SS14.Shared.Interfaces.GameObjects; using SS14.Shared.Interfaces.GameObjects.Components; using SS14.Shared.IoC; +using SS14.Shared.ViewVariables; using static Content.Shared.Construction.ConstructionStepMaterial; using static Content.Shared.Construction.ConstructionStepTool; @@ -20,7 +21,9 @@ namespace Content.Server.GameObjects.Components.Construction { public override string Name => "Construction"; + [ViewVariables] public ConstructionPrototype Prototype { get; private set; } + [ViewVariables] public int Stage { get; private set; } SpriteComponent Sprite; diff --git a/Content.Server/GameObjects/Components/Damage/DamageableComponent.cs b/Content.Server/GameObjects/Components/Damage/DamageableComponent.cs index f71415ab95..cc8d76d428 100644 --- a/Content.Server/GameObjects/Components/Damage/DamageableComponent.cs +++ b/Content.Server/GameObjects/Components/Damage/DamageableComponent.cs @@ -8,6 +8,7 @@ using YamlDotNet.RepresentationModel; using Content.Server.Interfaces; using Content.Shared.GameObjects; using SS14.Shared.Serialization; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects { @@ -29,6 +30,7 @@ namespace Content.Server.GameObjects /// The resistance set of this object. /// Affects receiving damage of various types. /// + [ViewVariables] public ResistanceSet Resistances { get; private set; } Dictionary CurrentDamage = new Dictionary(); diff --git a/Content.Server/GameObjects/Components/Damage/DestructibleComponent.cs b/Content.Server/GameObjects/Components/Damage/DestructibleComponent.cs index 83181f4165..7eef3e39f8 100644 --- a/Content.Server/GameObjects/Components/Damage/DestructibleComponent.cs +++ b/Content.Server/GameObjects/Components/Damage/DestructibleComponent.cs @@ -7,6 +7,7 @@ using YamlDotNet.RepresentationModel; using Content.Server.Interfaces; using Content.Shared.GameObjects; using SS14.Shared.Serialization; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects { @@ -25,6 +26,7 @@ namespace Content.Server.GameObjects /// Damage threshold calculated from the values /// given in the prototype declaration. /// + [ViewVariables] public DamageThreshold Threshold { get; private set; } diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index 01bae87af6..851f67484e 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -11,12 +11,14 @@ using SS14.Shared.IoC; using Content.Server.GameObjects.EntitySystems; using SS14.Shared.Serialization; using SS14.Shared.Interfaces.Network; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects { public class ServerDoorComponent : Component, IAttackHand { public override string Name => "Door"; + [ViewVariables] public bool Opened { get; private set; } private float OpenTimeCounter; diff --git a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs index 54d42f55fd..07c52fbbad 100644 --- a/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs +++ b/Content.Server/GameObjects/Components/GUI/ServerHandsComponent.cs @@ -15,6 +15,7 @@ using SS14.Shared.Interfaces.Network; using SS14.Shared.IoC; using SS14.Shared.Map; using SS14.Shared.Serialization; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects { @@ -22,6 +23,7 @@ namespace Content.Server.GameObjects { private string activeIndex; + [ViewVariables(VVAccess.ReadWrite)] public string ActiveIndex { get => activeIndex; diff --git a/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs b/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs index ea7c4903c6..b5479c8190 100644 --- a/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs @@ -9,6 +9,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Interactable { @@ -25,6 +26,7 @@ namespace Content.Server.GameObjects.Components.Interactable /// /// Status of light, whether or not it is emitting light. /// + [ViewVariables] public bool Activated { get; private set; } = false; public override void Initialize() diff --git a/Content.Server/GameObjects/Components/Interactable/Tools/BaseTool.cs b/Content.Server/GameObjects/Components/Interactable/Tools/BaseTool.cs index ee947002b8..de8b3c6aa8 100644 --- a/Content.Server/GameObjects/Components/Interactable/Tools/BaseTool.cs +++ b/Content.Server/GameObjects/Components/Interactable/Tools/BaseTool.cs @@ -1,6 +1,7 @@ using SS14.Shared.GameObjects; using SS14.Shared.Serialization; using SS14.Shared.Utility; +using SS14.Shared.ViewVariables; using YamlDotNet.RepresentationModel; namespace Content.Server.GameObjects.Components.Interactable.Tools @@ -10,6 +11,7 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools /// /// For tool interactions that have a delay before action this will modify the rate, time to wait is divided by this value /// + [ViewVariables(VVAccess.ReadWrite)] public float SpeedModifier { get => _speedModifier; diff --git a/Content.Server/GameObjects/Components/Interactable/Tools/WelderComponent.cs b/Content.Server/GameObjects/Components/Interactable/Tools/WelderComponent.cs index 46839aa09c..2a42e3ce56 100644 --- a/Content.Server/GameObjects/Components/Interactable/Tools/WelderComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/Tools/WelderComponent.cs @@ -5,6 +5,7 @@ using YamlDotNet.RepresentationModel; using SS14.Server.GameObjects; using Content.Server.GameObjects.EntitySystems; using SS14.Shared.Serialization; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Interactable.Tools { @@ -20,6 +21,7 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools /// /// Maximum fuel capacity the welder can hold /// + [ViewVariables(VVAccess.ReadWrite)] public float FuelCapacity { get => _fuelCapacity; @@ -30,6 +32,7 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools /// /// Fuel the welder has to do tasks /// + [ViewVariables(VVAccess.ReadWrite)] public float Fuel { get => _fuel; @@ -50,6 +53,7 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools /// /// Status of welder, whether it is ignited /// + [ViewVariables] public bool Activated { get; private set; } = false; //private string OnSprite { get; set; } diff --git a/Content.Server/GameObjects/Components/Mobs/MindComponent.cs b/Content.Server/GameObjects/Components/Mobs/MindComponent.cs index 4888fecff8..50e6cf7f12 100644 --- a/Content.Server/GameObjects/Components/Mobs/MindComponent.cs +++ b/Content.Server/GameObjects/Components/Mobs/MindComponent.cs @@ -9,6 +9,7 @@ using SS14.Shared.GameObjects; using SS14.Shared.Interfaces.GameObjects; using SS14.Shared.Interfaces.Network; using SS14.Shared.Log; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Mobs { @@ -23,11 +24,13 @@ namespace Content.Server.GameObjects.Components.Mobs /// /// The mind controlling this mob. Can be null. /// + [ViewVariables] public Mind Mind { get; private set; } /// /// True if we have a mind, false otherwise. /// + [ViewVariables] public bool HasMind => Mind != null; /// diff --git a/Content.Server/GameObjects/Components/Power/PowerDevice.cs b/Content.Server/GameObjects/Components/Power/PowerDevice.cs index 4f534007d5..e2b56703e8 100644 --- a/Content.Server/GameObjects/Components/Power/PowerDevice.cs +++ b/Content.Server/GameObjects/Components/Power/PowerDevice.cs @@ -9,6 +9,7 @@ using SS14.Shared.Utility; using System; using System.Collections.Generic; using System.Linq; +using SS14.Shared.ViewVariables; using YamlDotNet.RepresentationModel; namespace Content.Server.GameObjects.Components.Power @@ -23,6 +24,7 @@ namespace Content.Server.GameObjects.Components.Power /// /// The method of draw we will try to use to place our load set via component parameter, defaults to using power providers /// + [ViewVariables] public virtual DrawTypes DrawType { get => _drawType; @@ -33,14 +35,17 @@ namespace Content.Server.GameObjects.Components.Power /// /// The power draw method we are currently connected to and using /// + [ViewVariables] public DrawTypes Connected { get; protected set; } = DrawTypes.None; + [ViewVariables] public bool Powered { get; private set; } = false; /// /// Is an external power source currently available? /// + [ViewVariables] public bool ExternalPowered { get => _externalPowered; @@ -55,6 +60,7 @@ namespace Content.Server.GameObjects.Components.Power /// /// Is an internal power source currently available? /// + [ViewVariables] public bool InternalPowered { get => _internalPowered; @@ -69,6 +75,7 @@ namespace Content.Server.GameObjects.Components.Power /// /// Priority for powernet draw, lower will draw first, defined in powernet.cs /// + [ViewVariables] public virtual Powernet.Priority Priority { get => _priority; @@ -81,6 +88,7 @@ namespace Content.Server.GameObjects.Components.Power /// Power load from this entity. /// In Watts. /// + [ViewVariables] public float Load { get => _load; @@ -98,6 +106,7 @@ namespace Content.Server.GameObjects.Components.Power /// /// A power provider that will handle our load, if we are linked to any /// + [ViewVariables] public PowerProviderComponent Provider { get => _provider; diff --git a/Content.Server/GameObjects/Components/Power/PowerGeneratorComponent.cs b/Content.Server/GameObjects/Components/Power/PowerGeneratorComponent.cs index b2dcf366a5..425677f648 100644 --- a/Content.Server/GameObjects/Components/Power/PowerGeneratorComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerGeneratorComponent.cs @@ -5,6 +5,7 @@ using SS14.Shared.Log; using SS14.Shared.Serialization; using SS14.Shared.Utility; using System; +using SS14.Shared.ViewVariables; using YamlDotNet.RepresentationModel; namespace Content.Server.GameObjects.Components.Power @@ -20,6 +21,7 @@ namespace Content.Server.GameObjects.Components.Power /// Power supply from this entity /// private float _supply = 1000; //arbitrary initial magic number to start + [ViewVariables] public float Supply { get => _supply; diff --git a/Content.Server/GameObjects/Components/Power/PowerNodeComponent.cs b/Content.Server/GameObjects/Components/Power/PowerNodeComponent.cs index 329a4ea0e7..3daf442272 100644 --- a/Content.Server/GameObjects/Components/Power/PowerNodeComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerNodeComponent.cs @@ -5,6 +5,7 @@ using SS14.Shared.Interfaces.GameObjects.Components; using SS14.Shared.IoC; using System; using System.Linq; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Power { @@ -18,7 +19,8 @@ namespace Content.Server.GameObjects.Components.Power /// /// The powernet this node is connected to /// - public Powernet Parent; + [ViewVariables] + public Powernet Parent { get; set; } /// /// An event handling when this node connects to a powernet diff --git a/Content.Server/GameObjects/Components/Power/PowerProviderComponent.cs b/Content.Server/GameObjects/Components/Power/PowerProviderComponent.cs index f6209f5480..758939e765 100644 --- a/Content.Server/GameObjects/Components/Power/PowerProviderComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerProviderComponent.cs @@ -9,6 +9,7 @@ using SS14.Shared.Utility; using System; using System.Collections.Generic; using System.Linq; +using SS14.Shared.ViewVariables; using YamlDotNet.RepresentationModel; namespace Content.Server.GameObjects.Components.Power @@ -26,6 +27,7 @@ namespace Content.Server.GameObjects.Components.Power /// /// Variable that determines the range that the power provider will try to supply power to /// + [ViewVariables] public int PowerRange { get => _range; @@ -51,6 +53,7 @@ namespace Content.Server.GameObjects.Components.Power private bool _mainBreaker = true; + [ViewVariables(VVAccess.ReadWrite)] public bool MainBreaker { get => _mainBreaker; @@ -76,6 +79,7 @@ namespace Content.Server.GameObjects.Components.Power private float _theoreticalLoad = 0f; + [ViewVariables] public float TheoreticalLoad { get => _theoreticalLoad; diff --git a/Content.Server/GameObjects/Components/Power/PowerStorageComponent.cs b/Content.Server/GameObjects/Components/Power/PowerStorageComponent.cs index d275098792..0880c9cdc5 100644 --- a/Content.Server/GameObjects/Components/Power/PowerStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerStorageComponent.cs @@ -5,6 +5,7 @@ using SS14.Shared.IoC; using SS14.Shared.Serialization; using SS14.Shared.Utility; using System; +using SS14.Shared.ViewVariables; using YamlDotNet.RepresentationModel; namespace Content.Server.GameObjects.Components.Power @@ -23,6 +24,7 @@ namespace Content.Server.GameObjects.Components.Power /// Maximum amount of energy the internal battery can store. /// In Joules. /// + [ViewVariables] public float Capacity => _capacity; private float _capacity = 10000; // Arbitrary value, replace. @@ -30,6 +32,7 @@ namespace Content.Server.GameObjects.Components.Power /// Energy the battery is currently storing. /// In Joules. /// + [ViewVariables] public float Charge => _charge; private float _charge = 0; @@ -37,6 +40,7 @@ namespace Content.Server.GameObjects.Components.Power /// Rate at which energy will be taken to charge internal battery. /// In Watts. /// + [ViewVariables] public float ChargeRate => _chargeRate; private float _chargeRate = 1000; @@ -44,9 +48,11 @@ namespace Content.Server.GameObjects.Components.Power /// Rate at which energy will be distributed to the powernet if needed. /// In Watts. /// + [ViewVariables] public float DistributionRate => _distributionRate; private float _distributionRate = 1000; + [ViewVariables] public bool Full => Charge >= Capacity; private bool _chargepowernet = false; @@ -54,6 +60,7 @@ namespace Content.Server.GameObjects.Components.Power /// /// Do we distribute power into the powernet from our stores if the powernet requires it? /// + [ViewVariables(VVAccess.ReadWrite)] public bool ChargePowernet { get => _chargepowernet; diff --git a/Content.Server/GameObjects/Components/Power/PowerTransferComponent.cs b/Content.Server/GameObjects/Components/Power/PowerTransferComponent.cs index 5f5c2435a0..ddfdb1919b 100644 --- a/Content.Server/GameObjects/Components/Power/PowerTransferComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerTransferComponent.cs @@ -7,6 +7,7 @@ using System.Linq; using SS14.Shared.Interfaces.GameObjects; using Content.Server.GameObjects.Components.Interactable.Tools; using SS14.Shared.Interfaces.GameObjects.Components; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Power { @@ -20,8 +21,10 @@ namespace Content.Server.GameObjects.Components.Power /// /// The powernet this component is connected to /// - public Powernet Parent; + [ViewVariables] + public Powernet Parent { get; set; } + [ViewVariables] public bool Regenerating { get; set; } = false; public override void Initialize() diff --git a/Content.Server/GameObjects/Components/Power/Powernet.cs b/Content.Server/GameObjects/Components/Power/Powernet.cs index 5bea80adc9..2e8796181d 100644 --- a/Content.Server/GameObjects/Components/Power/Powernet.cs +++ b/Content.Server/GameObjects/Components/Power/Powernet.cs @@ -4,6 +4,7 @@ using SS14.Shared.IoC; using SS14.Shared.Log; using System; using System.Collections.Generic; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Power { @@ -23,6 +24,7 @@ namespace Content.Server.GameObjects.Components.Power /// /// Unique identifier per powernet, used for debugging mostly. /// + [ViewVariables] public int Uid { get; } /// @@ -41,6 +43,7 @@ namespace Content.Server.GameObjects.Components.Power private readonly Dictionary GeneratorList = new Dictionary(); + [ViewVariables] public int GeneratorCount => GeneratorList.Count; /// @@ -49,6 +52,7 @@ namespace Content.Server.GameObjects.Components.Power private readonly SortedSet DeviceLoadList = new SortedSet(new DevicePriorityCompare()); + [ViewVariables] public int DeviceCount => DeviceLoadList.Count; /// @@ -61,6 +65,7 @@ namespace Content.Server.GameObjects.Components.Power /// private readonly List PowerStorageSupplierList = new List(); + [ViewVariables] public int PowerStorageSupplierCount => PowerStorageSupplierList.Count; /// @@ -68,23 +73,27 @@ namespace Content.Server.GameObjects.Components.Power /// private readonly List PowerStorageConsumerList = new List(); + [ViewVariables] public int PowerStorageConsumerCount => PowerStorageConsumerList.Count; /// /// Static counter of all continuous load placed from devices on this power network. /// In Watts. /// + [ViewVariables] public float Load { get; private set; } = 0; /// /// Static counter of all continuous supply from generators on this power network. /// In Watts. /// + [ViewVariables] public float Supply { get; private set; } = 0; /// /// Variable that causes powernet to be regenerated from its wires during the next update cycle. /// + [ViewVariables] public bool Dirty { get; set; } = false; // These are stats for power monitoring equipment such as APCs. @@ -93,6 +102,7 @@ namespace Content.Server.GameObjects.Components.Power /// The total supply that was available to us last tick. /// This does not mean it was used. /// + [ViewVariables] public float LastTotalAvailable { get; private set; } /// @@ -102,6 +112,7 @@ namespace Content.Server.GameObjects.Components.Power /// If avail < demand, this will be just <= than the actual avail /// (e.g. if all machines need 100 W but there's 20 W excess, the 20 W will be avail but not drawn.) /// + [ViewVariables] public float LastTotalDraw { get; private set; } /// @@ -111,6 +122,7 @@ namespace Content.Server.GameObjects.Components.Power /// As such, this will quite abruptly shoot up if available rises to cover supplier charge demand too. /// /// + [ViewVariables] public float LastTotalDemand { get; private set; } /// @@ -118,11 +130,13 @@ namespace Content.Server.GameObjects.Components.Power /// This does not mean it was full filled in practice. /// See for the difference. /// + [ViewVariables] public float LastTotalDemandWithSuppliers { get; private set; } /// /// The amount of power that we are lacking to properly power everything (excluding storage supplier charging). /// + [ViewVariables] public float Lack => Math.Max(0, LastTotalDemand - LastTotalAvailable); /// @@ -131,6 +145,7 @@ namespace Content.Server.GameObjects.Components.Power /// It is ALSO not implied that if this is > 0, that we have sufficient power for everything. /// See the doc comment on . /// + [ViewVariables] public float Excess => Math.Max(0, LastTotalAvailable - LastTotalDraw); public void Update(float frameTime) diff --git a/Content.Server/GameObjects/Components/Stack/StackComponent.cs b/Content.Server/GameObjects/Components/Stack/StackComponent.cs index fd8446fc60..3911005979 100644 --- a/Content.Server/GameObjects/Components/Stack/StackComponent.cs +++ b/Content.Server/GameObjects/Components/Stack/StackComponent.cs @@ -5,6 +5,7 @@ using SS14.Shared.Interfaces.GameObjects; using SS14.Shared.Interfaces.Reflection; using SS14.Shared.IoC; using SS14.Shared.Serialization; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Stack { @@ -17,6 +18,7 @@ namespace Content.Server.GameObjects.Components.Stack public override string Name => "Stack"; + [ViewVariables] public int Count { get => _count; @@ -29,9 +31,14 @@ namespace Content.Server.GameObjects.Components.Stack } } } + + [ViewVariables] public int MaxCount { get => _maxCount; private set => _maxCount = value; } + + [ViewVariables] public int AvailableSpace => MaxCount - Count; + [ViewVariables] public object StackType { get; private set; } public void Add(int amount) diff --git a/Content.Server/GameObjects/Components/Temperature/TemperatureComponent.cs b/Content.Server/GameObjects/Components/Temperature/TemperatureComponent.cs index 1f425166f7..9c6f88f9f6 100644 --- a/Content.Server/GameObjects/Components/Temperature/TemperatureComponent.cs +++ b/Content.Server/GameObjects/Components/Temperature/TemperatureComponent.cs @@ -6,6 +6,7 @@ using SS14.Shared.Utility; using YamlDotNet.RepresentationModel; using Content.Shared.GameObjects; using SS14.Shared.Serialization; +using SS14.Shared.ViewVariables; namespace Content.Server.GameObjects { @@ -23,6 +24,7 @@ namespace Content.Server.GameObjects public override uint? NetID => ContentNetIDs.TEMPERATURE; //TODO: should be programmatic instead of how it currently is + [ViewVariables] public float CurrentTemperature { get; private set; } = PhysicalConstants.ZERO_CELCIUS; float _fireDamageThreshold = 0; diff --git a/Content.Server/Mobs/Mind.cs b/Content.Server/Mobs/Mind.cs index 2ac536c79a..4809ec3dcc 100644 --- a/Content.Server/Mobs/Mind.cs +++ b/Content.Server/Mobs/Mind.cs @@ -5,6 +5,7 @@ using SS14.Server.Interfaces.Player; using SS14.Shared.Interfaces.GameObjects; using SS14.Shared.IoC; using SS14.Shared.Network; +using SS14.Shared.ViewVariables; namespace Content.Server.Mobs { @@ -14,7 +15,7 @@ namespace Content.Server.Mobs /// /// Think of it like this: if a player is supposed to have their memories, /// their mind follows along. - /// + /// /// Things such as respawning do not follow, because you're a new character. /// Getting borged, cloned, turned into a catbeast, etc... will keep it following you. /// @@ -184,7 +185,7 @@ namespace Content.Server.Mobs throw new ArgumentException("That entity already has a mind.", nameof(entity)); } } - + CurrentMob?.InternalEjectMind(); CurrentMob = component; CurrentMob?.InternalAssignMind(this); diff --git a/Content.Server/Players/PlayerData.cs b/Content.Server/Players/PlayerData.cs index f7dbf25fde..0188331674 100644 --- a/Content.Server/Players/PlayerData.cs +++ b/Content.Server/Players/PlayerData.cs @@ -1,6 +1,7 @@ using Content.Server.Mobs; using SS14.Server.Interfaces.Player; using SS14.Shared.Network; +using SS14.Shared.ViewVariables; namespace Content.Server.Players { @@ -13,11 +14,13 @@ namespace Content.Server.Players /// /// The session ID of the player owning this data. /// + [ViewVariables] public NetSessionId SessionId { get; } /// /// The currently occupied mind of the player owning this data. /// + [ViewVariables] public Mind Mind { get; set; } public PlayerData(NetSessionId sessionId) diff --git a/Resources/Groups/groups.yml b/Resources/Groups/groups.yml index 0ec624676b..197fd56acc 100644 --- a/Resources/Groups/groups.yml +++ b/Resources/Groups/groups.yml @@ -32,3 +32,4 @@ - whisper - me - ooc + CanViewVar: true diff --git a/engine b/engine index 6e95476156..523e4d8c49 160000 --- a/engine +++ b/engine @@ -1 +1 @@ -Subproject commit 6e9547615621333214c05675a47ec678e6fadb88 +Subproject commit 523e4d8c4961b7bc145e5198c3ce42f170718754