Make more Fields VV and more editable (#2051)

* Make more Fields VV and more editable

* Applied feedback

Co-authored-by: David Tan <>
This commit is contained in:
DTanxxx
2020-09-14 00:04:00 +12:00
committed by GitHub
parent a359b6b8b0
commit 4d50666ee4
11 changed files with 12 additions and 4 deletions

View File

@@ -38,6 +38,7 @@ namespace Content.Client.GameObjects.Components.Mobs
/// <summary>
/// Allows calculating if we need to act due to this component being controlled by the current mob
/// </summary>
[ViewVariables]
private bool CurrentlyControlled => _playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity == Owner;
protected override void Shutdown()

View File

@@ -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)

View File

@@ -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();

View File

@@ -49,7 +49,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
[ViewVariables] private ReagentUnit _dispenseAmount = ReagentUnit.New(10);
[ViewVariables] private SolutionContainerComponent? Solution => _beakerContainer.ContainedEntity.GetComponent<SolutionContainerComponent>();
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);

View File

@@ -55,6 +55,7 @@ namespace Content.Server.GameObjects.Components.Disposal
/// <summary>
/// Last time that an entity tried to exit this disposal unit.
/// </summary>
[ViewVariables]
private TimeSpan _lastExitAttempt;
/// <summary>
@@ -72,7 +73,7 @@ namespace Content.Server.GameObjects.Components.Disposal
[ViewVariables(VVAccess.ReadWrite)]
private TimeSpan _flushDelay;
[ViewVariables]
[ViewVariables(VVAccess.ReadWrite)]
private float _entryDelay;
/// <summary>

View File

@@ -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;

View File

@@ -55,6 +55,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
[ViewVariables]
public IReadOnlyCollection<IEntity>? StoredEntities => _storage?.ContainedEntities;
[ViewVariables(VVAccess.ReadWrite)]
public bool OccludesLight
{
get => _occludesLight;

View File

@@ -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);

View File

@@ -56,6 +56,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
[ViewVariables]
private string _fillPrototype;
[ViewVariables]
private int _unspawnedCount;
public bool BoltOpen

View File

@@ -53,6 +53,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
[ViewVariables]
private string _fillPrototype;
[ViewVariables]
private int _unspawnedCount;
private bool _manualCycle;

View File

@@ -44,6 +44,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Ranged.Barrels
private AppearanceComponent _appearanceComponent;
[ViewVariables]
private string _fillPrototype;
[ViewVariables]
private int _unspawnedCount;
// Sounds