From 4d50666ee421ee9c632ef2ac566a2b18839a9c02 Mon Sep 17 00:00:00 2001
From: DTanxxx <55208219+DTanxxx@users.noreply.github.com>
Date: Mon, 14 Sep 2020 00:04:00 +1200
Subject: [PATCH] Make more Fields VV and more editable (#2051)
* Make more Fields VV and more editable
* Applied feedback
Co-authored-by: David Tan <>
---
.../Components/Mobs/ClientStatusEffectsComponent.cs | 1 +
.../GameObjects/Components/Atmos/MovedByPressureComponent.cs | 2 +-
.../GameObjects/Components/Chemistry/ChemMasterComponent.cs | 2 +-
.../Components/Chemistry/ReagentDispenserComponent.cs | 2 +-
.../GameObjects/Components/Disposal/DisposalUnitComponent.cs | 3 ++-
.../GameObjects/Components/Doors/ServerDoorComponent.cs | 1 +
.../Components/Items/Storage/ServerStorageComponent.cs | 1 +
.../GameObjects/Components/Research/LatheComponent.cs | 1 +
.../Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs | 1 +
.../Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs | 1 +
.../Weapon/Ranged/Barrels/RevolverBarrelComponent.cs | 1 +
11 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs b/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs
index 68ce125a39..5b6358d0bd 100644
--- a/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs
+++ b/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs
@@ -38,6 +38,7 @@ namespace Content.Client.GameObjects.Components.Mobs
///
/// Allows calculating if we need to act due to this component being controlled by the current mob
///
+ [ViewVariables]
private bool CurrentlyControlled => _playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity == Owner;
protected override void Shutdown()
diff --git a/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs b/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs
index 363d74e86b..851f281a58 100644
--- a/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs
+++ b/Content.Server/GameObjects/Components/Atmos/MovedByPressureComponent.cs
@@ -13,7 +13,7 @@ namespace Content.Server.GameObjects.Components.Atmos
public float PressureResistance { get; set; } = 1f;
[ViewVariables(VVAccess.ReadWrite)]
public float MoveResist { get; set; } = 100f;
- [ViewVariables]
+ [ViewVariables(VVAccess.ReadWrite)]
public int LastHighPressureMovementAirCycle { get; set; } = 0;
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 0092150d03..a05d9cd351 100644
--- a/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs
+++ b/Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs
@@ -45,7 +45,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
[ViewVariables] private bool HasBeaker => _beakerContainer.ContainedEntity != null;
[ViewVariables] private bool _bufferModeTransfer = true;
- private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered;
+ [ViewVariables] private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered;
[ViewVariables] private readonly SolutionContainerComponent BufferSolution = new SolutionContainerComponent();
diff --git a/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs b/Content.Server/GameObjects/Components/Chemistry/ReagentDispenserComponent.cs
index d35237b669..f2b2cfcfca 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 SolutionContainerComponent? Solution => _beakerContainer.ContainedEntity.GetComponent();
- 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(ReagentDispenserUiKey.Key);
diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs
index c2069463f3..b9919185c9 100644
--- a/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs
+++ b/Content.Server/GameObjects/Components/Disposal/DisposalUnitComponent.cs
@@ -55,6 +55,7 @@ namespace Content.Server.GameObjects.Components.Disposal
///
/// Last time that an entity tried to exit this disposal unit.
///
+ [ViewVariables]
private TimeSpan _lastExitAttempt;
///
@@ -72,7 +73,7 @@ namespace Content.Server.GameObjects.Components.Disposal
[ViewVariables(VVAccess.ReadWrite)]
private TimeSpan _flushDelay;
- [ViewVariables]
+ [ViewVariables(VVAccess.ReadWrite)]
private float _entryDelay;
///
diff --git a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs
index 79b48d6453..3c506d3bbf 100644
--- a/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs
+++ b/Content.Server/GameObjects/Components/Doors/ServerDoorComponent.cs
@@ -46,6 +46,7 @@ namespace Content.Server.GameObjects.Components.Doors
protected set => _state = value;
}
+ [ViewVariables]
protected float OpenTimeCounter;
[ViewVariables(VVAccess.ReadWrite)]
protected bool AutoClose = true;
diff --git a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs
index 0d59649be9..9c55256361 100644
--- a/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs
+++ b/Content.Server/GameObjects/Components/Items/Storage/ServerStorageComponent.cs
@@ -55,6 +55,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
[ViewVariables]
public IReadOnlyCollection? StoredEntities => _storage?.ContainedEntities;
+ [ViewVariables(VVAccess.ReadWrite)]
public bool OccludesLight
{
get => _occludesLight;
diff --git a/Content.Server/GameObjects/Components/Research/LatheComponent.cs b/Content.Server/GameObjects/Components/Research/LatheComponent.cs
index b0786c1912..af846aa738 100644
--- a/Content.Server/GameObjects/Components/Research/LatheComponent.cs
+++ b/Content.Server/GameObjects/Components/Research/LatheComponent.cs
@@ -43,6 +43,7 @@ namespace Content.Server.GameObjects.Components.Research
[ViewVariables]
private LatheRecipePrototype? _producingRecipe;
+ [ViewVariables]
private bool Powered => !Owner.TryGetComponent(out PowerReceiverComponent? receiver) || receiver.Powered;
private static readonly TimeSpan InsertionTime = TimeSpan.FromSeconds(0.9f);
diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs
index 4eb9c7ead1..001a4e03a5 100644
--- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs
+++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/BoltActionBarrelComponent.cs
@@ -56,6 +56,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
[ViewVariables]
private string _fillPrototype;
+ [ViewVariables]
private int _unspawnedCount;
public bool BoltOpen
diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs
index ca794a5a97..ec0f0b047d 100644
--- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs
+++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/PumpBarrelComponent.cs
@@ -53,6 +53,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
[ViewVariables]
private string _fillPrototype;
+ [ViewVariables]
private int _unspawnedCount;
private bool _manualCycle;
diff --git a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs
index 6bff1faaeb..db4bff2693 100644
--- a/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs
+++ b/Content.Server/GameObjects/Components/Weapon/Ranged/Barrels/RevolverBarrelComponent.cs
@@ -44,6 +44,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
private AppearanceComponent _appearanceComponent;
[ViewVariables]
private string _fillPrototype;
+ [ViewVariables]
private int _unspawnedCount;
// Sounds