diff --git a/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs b/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs index 248767c326..68ce125a39 100644 --- a/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs +++ b/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs @@ -15,6 +15,7 @@ using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Robust.Shared.Maths; +using Robust.Shared.ViewVariables; namespace Content.Client.GameObjects.Components.Mobs { @@ -29,7 +30,9 @@ namespace Content.Client.GameObjects.Components.Mobs [Dependency] private readonly IGameTiming _gameTiming = default!; private StatusEffectsUI _ui; + [ViewVariables] private Dictionary _status = new Dictionary(); + [ViewVariables] private Dictionary _cooldown = new Dictionary(); /// diff --git a/Content.Server/GameObjects/Components/AnchorableComponent.cs b/Content.Server/GameObjects/Components/AnchorableComponent.cs index 224ce59886..446b9f5abc 100644 --- a/Content.Server/GameObjects/Components/AnchorableComponent.cs +++ b/Content.Server/GameObjects/Components/AnchorableComponent.cs @@ -7,6 +7,7 @@ using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components { @@ -15,6 +16,7 @@ namespace Content.Server.GameObjects.Components { public override string Name => "Anchorable"; + [ViewVariables] int IInteractUsing.Priority => 1; /// diff --git a/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs b/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs index 9e1e62f455..363d74e86b 100644 --- a/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs @@ -1,5 +1,6 @@ using Robust.Shared.GameObjects; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Atmos { @@ -8,8 +9,11 @@ namespace Content.Server.GameObjects.Components.Atmos { public override string Name => "MovedByPressure"; + [ViewVariables(VVAccess.ReadWrite)] public float PressureResistance { get; set; } = 1f; + [ViewVariables(VVAccess.ReadWrite)] public float MoveResist { get; set; } = 100f; + [ViewVariables] public int LastHighPressureMovementAirCycle { get; set; } = 0; public override void ExposeData(ObjectSerializer serializer) diff --git a/Content.Server/GameObjects/Components/Body/Digestive/StomachComponent.cs b/Content.Server/GameObjects/Components/Body/Digestive/StomachComponent.cs index 15c6d01e82..4d2d67eb2b 100644 --- a/Content.Server/GameObjects/Components/Body/Digestive/StomachComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Digestive/StomachComponent.cs @@ -50,6 +50,7 @@ namespace Content.Server.GameObjects.Components.Body.Digestive /// /// Used to track how long each reagent has been in the stomach /// + [ViewVariables] private readonly List _reagentDeltas = new List(); public override void ExposeData(ObjectSerializer serializer) diff --git a/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs b/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs index e62002fb32..c0e69913ab 100644 --- a/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs @@ -49,7 +49,7 @@ namespace Content.Server.GameObjects.Components.Chemistry private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered; - private readonly SolutionComponent BufferSolution = new SolutionComponent(); + [ViewVariables] private readonly SolutionComponent BufferSolution = new SolutionComponent(); [ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(ChemMasterUiKey.Key); diff --git a/Content.Server/GameObjects/Components/Chemistry/PourableComponent.cs b/Content.Server/GameObjects/Components/Chemistry/PourableComponent.cs index 7f23b562df..b6a4b279fe 100644 --- a/Content.Server/GameObjects/Components/Chemistry/PourableComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/PourableComponent.cs @@ -25,7 +25,7 @@ namespace Content.Server.GameObjects.Components.Chemistry /// /// The amount of solution to be transferred from this solution when clicking on other solutions with it. /// - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] public ReagentUnit TransferAmount { get => _transferAmount; diff --git a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs index 86580bb399..c326671bd1 100644 --- a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs @@ -49,7 +49,7 @@ namespace Content.Server.GameObjects.Components.Chemistry [ViewVariables] private ReagentUnit _dispenseAmount = ReagentUnit.New(10); [ViewVariables] - private SolutionComponent Solution => _beakerContainer.ContainedEntity.GetComponent(); + private SolutionComponent? Solution => _beakerContainer.ContainedEntity?.GetComponent(); private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered; diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs index 634a55b002..c2069463f3 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs @@ -61,14 +61,15 @@ namespace Content.Server.GameObjects.Components.Disposal /// The current pressure of this disposal unit. /// Prevents it from flushing if it is not equal to or bigger than 1. /// + [ViewVariables] private float _pressure; private bool _engaged; - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] private TimeSpan _automaticEngageTime; - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] private TimeSpan _flushDelay; [ViewVariables] @@ -101,7 +102,7 @@ namespace Content.Server.GameObjects.Components.Disposal [ViewVariables] private PressureState State => _pressure >= 1 ? PressureState.Ready : PressureState.Pressurizing; - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] private bool Engaged { get => _engaged; diff --git a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs index 03dabcc6c4..b00e348ef8 100644 --- a/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/AirlockComponent.cs @@ -18,6 +18,7 @@ using Robust.Shared.GameObjects.Systems; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Maths; +using Robust.Shared.ViewVariables; using static Content.Shared.GameObjects.Components.SharedWiresComponent; using static Content.Shared.GameObjects.Components.SharedWiresComponent.WiresAction; using Timer = Robust.Shared.Timers.Timer; @@ -43,6 +44,7 @@ namespace Content.Server.GameObjects.Components.Doors /// /// True if either power wire was pulsed in the last . /// + [ViewVariables(VVAccess.ReadWrite)] private bool PowerWiresPulsed { get => _powerWiresPulsed; @@ -56,6 +58,7 @@ namespace Content.Server.GameObjects.Components.Doors private bool _boltsDown; + [ViewVariables(VVAccess.ReadWrite)] private bool BoltsDown { get => _boltsDown; @@ -68,6 +71,7 @@ namespace Content.Server.GameObjects.Components.Doors private bool _boltLightsWirePulsed = true; + [ViewVariables(VVAccess.ReadWrite)] private bool BoltLightsVisible { get => _boltLightsWirePulsed && BoltsDown && IsPowered() && State == DoorState.Closed; @@ -80,6 +84,7 @@ namespace Content.Server.GameObjects.Components.Doors private const float AutoCloseDelayFast = 1; // True => AutoCloseDelay; False => AutoCloseDelayFast + [ViewVariables(VVAccess.ReadWrite)] private bool NormalCloseSpeed { get => CloseSpeed == AutoCloseDelay; diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs index 5042371ea4..cebf82ab73 100644 --- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs +++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs @@ -36,6 +36,7 @@ namespace Content.Server.GameObjects.Components.Doors { public override string Name => "Door"; + [ViewVariables] private DoorState _state = DoorState.Closed; public virtual DoorState State @@ -45,8 +46,10 @@ namespace Content.Server.GameObjects.Components.Doors } protected float OpenTimeCounter; + [ViewVariables(VVAccess.ReadWrite)] protected bool AutoClose = true; protected const float AutoCloseDelay = 5; + [ViewVariables(VVAccess.ReadWrite)] protected float CloseSpeed = AutoCloseDelay; private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource(); @@ -59,11 +62,12 @@ namespace Content.Server.GameObjects.Components.Doors private const int DoorCrushDamage = 15; private const float DoorStunTime = 5f; + [ViewVariables(VVAccess.ReadWrite)] protected bool Safety = true; - [ViewVariables] private bool _occludes; + [ViewVariables(VVAccess.ReadWrite)] private bool _occludes; - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] public bool IsWeldedShut { get => _isWeldedShut; diff --git a/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs b/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs index e0920a2773..78d1a5659f 100644 --- a/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs @@ -9,6 +9,7 @@ using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines; namespace Content.Server.GameObjects.Components.Items.Clothing @@ -22,13 +23,16 @@ namespace Content.Server.GameObjects.Components.Items.Clothing public override string Name => "Clothing"; public override uint? NetID => ContentNetIDs.CLOTHING; + [ViewVariables] public SlotFlags SlotFlags = SlotFlags.PREVENTEQUIP; //Different from None, NONE allows equips if no slot flags are required private bool _quickEquipEnabled = true; private int _heatResistance; + [ViewVariables(VVAccess.ReadWrite)] public int HeatResistance => _heatResistance; private string _clothingEquippedPrefix; + [ViewVariables(VVAccess.ReadWrite)] public string ClothingEquippedPrefix { get diff --git a/Content.Server/GameObjects/Components/Items/Storage/Fill/StorageFillComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/Fill/StorageFillComponent.cs index ae309a1765..b17a5235f5 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/Fill/StorageFillComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/Fill/StorageFillComponent.cs @@ -4,6 +4,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.IoC; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Items.Storage.Fill { @@ -14,6 +15,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage.Fill public override string Name => "StorageFill"; + [ViewVariables] private List _contents = new List(); public override void ExposeData(ObjectSerializer serializer) diff --git a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs index 6ec0c5ce35..0d59649be9 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs @@ -26,6 +26,7 @@ using Robust.Shared.IoC; using Robust.Shared.Log; using Robust.Shared.Players; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Items.Storage { @@ -51,6 +52,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage private int _storageCapacityMax; public readonly HashSet SubscribedSessions = new HashSet(); + [ViewVariables] public IReadOnlyCollection? StoredEntities => _storage?.ContainedEntities; public bool OccludesLight diff --git a/Content.Server/GameObjects/Components/Mobs/ServerStatusEffectsComponent.cs b/Content.Server/GameObjects/Components/Mobs/ServerStatusEffectsComponent.cs index 221246867e..a9cf642938 100644 --- a/Content.Server/GameObjects/Components/Mobs/ServerStatusEffectsComponent.cs +++ b/Content.Server/GameObjects/Components/Mobs/ServerStatusEffectsComponent.cs @@ -8,6 +8,7 @@ using Content.Shared.Interfaces; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.Network; using Robust.Shared.Players; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Mobs { @@ -15,6 +16,7 @@ namespace Content.Server.GameObjects.Components.Mobs [ComponentReference(typeof(SharedStatusEffectsComponent))] public sealed class ServerStatusEffectsComponent : SharedStatusEffectsComponent { + [ViewVariables] private readonly Dictionary _statusEffects = new Dictionary(); public override ComponentState GetComponentState() diff --git a/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs b/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs index 3a317ec1d4..a84ed3bc25 100644 --- a/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs @@ -40,9 +40,9 @@ namespace Content.Server.GameObjects.Components.Nutrition private string _useSound; [ViewVariables] private bool _defaultToOpened; - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] public ReagentUnit TransferAmount { get; private set; } = ReagentUnit.New(2); - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] public bool Opened { get; protected set; } [ViewVariables] public bool Empty => _contents.CurrentVolume.Float() <= 0; diff --git a/Content.Server/GameObjects/Components/PlaceableSurfaceComponent.cs b/Content.Server/GameObjects/Components/PlaceableSurfaceComponent.cs index ae7947a800..a14d624ad1 100644 --- a/Content.Server/GameObjects/Components/PlaceableSurfaceComponent.cs +++ b/Content.Server/GameObjects/Components/PlaceableSurfaceComponent.cs @@ -1,9 +1,10 @@ -using System.Threading.Tasks; +using System.Threading.Tasks; using Content.Server.GameObjects.Components.GUI; using Content.Shared.GameObjects.Components; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components { @@ -11,8 +12,10 @@ namespace Content.Server.GameObjects.Components public class PlaceableSurfaceComponent : SharedPlaceableSurfaceComponent, IInteractUsing { private bool _isPlaceable; + [ViewVariables(VVAccess.ReadWrite)] public bool IsPlaceable { get => _isPlaceable; set => _isPlaceable = value; } + [ViewVariables] int IInteractUsing.Priority => 1; public override void ExposeData(ObjectSerializer serializer) diff --git a/Content.Server/GameObjects/Components/Research/LatheComponent.cs b/Content.Server/GameObjects/Components/Research/LatheComponent.cs index 257bdb7c8f..b0786c1912 100644 --- a/Content.Server/GameObjects/Components/Research/LatheComponent.cs +++ b/Content.Server/GameObjects/Components/Research/LatheComponent.cs @@ -41,6 +41,7 @@ namespace Content.Server.GameObjects.Components.Research set => _state = value; } + [ViewVariables] private LatheRecipePrototype? _producingRecipe; private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered; diff --git a/Content.Server/GameObjects/Components/Research/LatheDatabaseComponent.cs b/Content.Server/GameObjects/Components/Research/LatheDatabaseComponent.cs index 955bd935d1..6ee60465e8 100644 --- a/Content.Server/GameObjects/Components/Research/LatheDatabaseComponent.cs +++ b/Content.Server/GameObjects/Components/Research/LatheDatabaseComponent.cs @@ -1,7 +1,8 @@ -using Content.Shared.GameObjects.Components.Research; +using Content.Shared.GameObjects.Components.Research; using Content.Shared.Research; using Robust.Shared.GameObjects; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Research { @@ -12,6 +13,7 @@ namespace Content.Server.GameObjects.Components.Research /// /// Whether new recipes can be added to this database or not. /// + [ViewVariables] public bool Static => _static; private bool _static = false; diff --git a/Content.Server/GameObjects/Components/Research/MaterialStorageComponent.cs b/Content.Server/GameObjects/Components/Research/MaterialStorageComponent.cs index 47c3958cd4..b863574720 100644 --- a/Content.Server/GameObjects/Components/Research/MaterialStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Research/MaterialStorageComponent.cs @@ -1,7 +1,8 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Content.Shared.GameObjects.Components.Research; using Robust.Shared.GameObjects; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Research { @@ -9,11 +10,13 @@ namespace Content.Server.GameObjects.Components.Research [ComponentReference(typeof(SharedMaterialStorageComponent))] public class MaterialStorageComponent : SharedMaterialStorageComponent { + [ViewVariables] protected override Dictionary Storage { get; set; } = new Dictionary(); /// /// How much material the storage can store in total. /// + [ViewVariables] public int StorageLimit => _storageLimit; private int _storageLimit; diff --git a/Content.Server/GameObjects/Components/Research/ResearchConsoleComponent.cs b/Content.Server/GameObjects/Components/Research/ResearchConsoleComponent.cs index e2136c29eb..81c66ad99f 100644 --- a/Content.Server/GameObjects/Components/Research/ResearchConsoleComponent.cs +++ b/Content.Server/GameObjects/Components/Research/ResearchConsoleComponent.cs @@ -29,7 +29,7 @@ namespace Content.Server.GameObjects.Components.Research private const string SoundCollectionName = "keyboard"; - private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered; + [ViewVariables] private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered; [ViewVariables] private BoundUserInterface? UserInterface => Owner.GetUIOrNull(ResearchConsoleUiKey.Key); diff --git a/Content.Server/GameObjects/Components/Research/ResearchPointSourceComponent.cs b/Content.Server/GameObjects/Components/Research/ResearchPointSourceComponent.cs index 01bb0e7b90..3ccd94d443 100644 --- a/Content.Server/GameObjects/Components/Research/ResearchPointSourceComponent.cs +++ b/Content.Server/GameObjects/Components/Research/ResearchPointSourceComponent.cs @@ -16,14 +16,14 @@ namespace Content.Server.GameObjects.Components.Research private bool _active; private PowerReceiverComponent _powerReceiver; - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] public int PointsPerSecond { get => _pointsPerSecond; set => _pointsPerSecond = value; } - [ViewVariables] + [ViewVariables(VVAccess.ReadWrite)] public bool Active { get => _active; @@ -34,6 +34,7 @@ namespace Content.Server.GameObjects.Components.Research /// Whether this can be used to produce research points. /// /// If no is found, it's assumed power is not required. + [ViewVariables] public bool CanProduce => Active && (_powerReceiver is null || _powerReceiver.Powered); public override void Initialize() diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs index 2135a6879f..4eb9c7ead1 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs @@ -20,6 +20,7 @@ using Robust.Shared.Localization; using Robust.Shared.Map; using Robust.Shared.Serialization; using Robust.Shared.Utility; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels { @@ -50,8 +51,10 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels private Stack _spawnedAmmo; private Container _ammoContainer; + [ViewVariables] private BallisticCaliber _caliber; + [ViewVariables] private string _fillPrototype; private int _unspawnedCount; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs index d1981567e3..ca794a5a97 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs @@ -18,6 +18,7 @@ using Robust.Shared.Localization; using Robust.Shared.Map; using Robust.Shared.Serialization; using Robust.Shared.Utility; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels { @@ -47,8 +48,10 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels private Stack _spawnedAmmo; private Container _ammoContainer; + [ViewVariables] private BallisticCaliber _caliber; + [ViewVariables] private string _fillPrototype; private int _unspawnedCount; diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs index 8989462aab..6bff1faaeb 100644 --- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs @@ -19,6 +19,7 @@ using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Map; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels { @@ -30,8 +31,10 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels public override string Name => "RevolverBarrel"; public override uint? NetID => ContentNetIDs.REVOLVER_BARREL; + [ViewVariables] private BallisticCaliber _caliber; private Container _ammoContainer; + [ViewVariables] private int _currentSlot = 0; public override int Capacity => _ammoSlots.Length; private IEntity[] _ammoSlots; @@ -39,6 +42,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels public override int ShotsLeft => _ammoContainer.ContainedEntities.Count; private AppearanceComponent _appearanceComponent; + [ViewVariables] private string _fillPrototype; private int _unspawnedCount; diff --git a/Content.Server/GameObjects/Components/WiresComponent.cs b/Content.Server/GameObjects/Components/WiresComponent.cs index 31edce94c6..5b8469c479 100644 --- a/Content.Server/GameObjects/Components/WiresComponent.cs +++ b/Content.Server/GameObjects/Components/WiresComponent.cs @@ -114,11 +114,13 @@ namespace Content.Server.GameObjects.Components /// /// Contains all registered wires. /// + [ViewVariables] public readonly List WiresList = new List(); /// /// Status messages are displayed at the bottom of the UI. /// + [ViewVariables] private readonly Dictionary _statuses = new Dictionary(); /// diff --git a/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs b/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs index 9edd468da6..a0dede9bc6 100644 --- a/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs +++ b/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs @@ -78,7 +78,9 @@ namespace Content.Shared.GameObjects.Components.Movement } } + [ViewVariables(VVAccess.ReadWrite)] public float CurrentPushSpeed => 5; + [ViewVariables(VVAccess.ReadWrite)] public float GrabRange => 0.2f; public bool Sprinting => !HasFlag(_heldMoveButtons, MoveButtons.Walk); diff --git a/Content.Shared/GameObjects/Components/VendingMachines/SharedVendingMachineComponent.cs b/Content.Shared/GameObjects/Components/VendingMachines/SharedVendingMachineComponent.cs index 5e7b2da2b4..76a689abd7 100644 --- a/Content.Shared/GameObjects/Components/VendingMachines/SharedVendingMachineComponent.cs +++ b/Content.Shared/GameObjects/Components/VendingMachines/SharedVendingMachineComponent.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components.UserInterface; using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Shared.GameObjects.Components.VendingMachines { @@ -11,6 +12,7 @@ namespace Content.Shared.GameObjects.Components.VendingMachines public override string Name => "VendingMachine"; public override uint? NetID => ContentNetIDs.VENDING_MACHINE; + [ViewVariables] public List Inventory = new List(); [Serializable, NetSerializable] @@ -63,7 +65,9 @@ namespace Content.Shared.GameObjects.Components.VendingMachines [Serializable, NetSerializable] public class VendingMachineInventoryEntry { + [ViewVariables(VVAccess.ReadWrite)] public string ID; + [ViewVariables(VVAccess.ReadWrite)] public uint Amount; public VendingMachineInventoryEntry(string id, uint amount) { diff --git a/Content.Shared/GameObjects/Components/Weapons/Ranged/SharedRangedBarrelComponent.cs b/Content.Shared/GameObjects/Components/Weapons/Ranged/SharedRangedBarrelComponent.cs index 5130abf347..d0562410a2 100644 --- a/Content.Shared/GameObjects/Components/Weapons/Ranged/SharedRangedBarrelComponent.cs +++ b/Content.Shared/GameObjects/Components/Weapons/Ranged/SharedRangedBarrelComponent.cs @@ -1,14 +1,20 @@ -using System; +using System; using Robust.Shared.GameObjects; +using Robust.Shared.ViewVariables; namespace Content.Shared.GameObjects.Components.Weapons.Ranged { public abstract class SharedRangedBarrelComponent : Component { + [ViewVariables] public abstract FireRateSelector FireRateSelector { get; } + [ViewVariables] public abstract FireRateSelector AllRateSelectors { get; } + [ViewVariables] public abstract float FireRate { get; } + [ViewVariables] public abstract int ShotsLeft { get; } + [ViewVariables] public abstract int Capacity { get; } } @@ -19,4 +25,4 @@ namespace Content.Shared.GameObjects.Components.Weapons.Ranged Single = 1 << 0, Automatic = 1 << 1, } -} \ No newline at end of file +}