Makes more fields VV (#2026)
* Some more VV * Fixed build & some more gun vvs * Added VendingMachine Inventory & Items
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Whether new recipes can be added to this database or not.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public bool Static => _static;
|
||||
private bool _static = false;
|
||||
|
||||
|
||||
@@ -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<string, int> Storage { get; set; } = new Dictionary<string, int>();
|
||||
|
||||
/// <summary>
|
||||
/// How much material the storage can store in total.
|
||||
/// </summary>
|
||||
[ViewVariables]
|
||||
public int StorageLimit => _storageLimit;
|
||||
private int _storageLimit;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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.
|
||||
/// </summary>
|
||||
/// <remarks>If no <see cref="PowerReceiverComponent"/> is found, it's assumed power is not required.</remarks>
|
||||
[ViewVariables]
|
||||
public bool CanProduce => Active && (_powerReceiver is null || _powerReceiver.Powered);
|
||||
|
||||
public override void Initialize()
|
||||
|
||||
Reference in New Issue
Block a user