Makes more fields VV (#2026)
* Some more VV * Fixed build & some more gun vvs * Added VendingMachine Inventory & Items
This commit is contained in:
@@ -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
|
||||
/// <summary>
|
||||
/// True if either power wire was pulsed in the last <see cref="PowerWiresTimeout"/>.
|
||||
/// </summary>
|
||||
[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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user