Remove redundant read-only VV from datafields (#12626)
This commit is contained in:
@@ -9,7 +9,6 @@ namespace Content.Server.Construction.Components
|
||||
[RegisterComponent]
|
||||
public sealed class ComputerBoardComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? Prototype { get; private set; }
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Content.Server.Construction.Components
|
||||
[RegisterComponent, ComponentProtoName("Computer")]
|
||||
public sealed class ComputerComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("board", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? BoardPrototype;
|
||||
}
|
||||
|
||||
@@ -10,19 +10,15 @@ namespace Content.Server.Construction.Components
|
||||
{
|
||||
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))]
|
||||
public readonly Dictionary<string, int> Requirements = new();
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("materialRequirements")]
|
||||
public readonly Dictionary<string, int> MaterialIdRequirements = new();
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("tagRequirements")]
|
||||
public readonly Dictionary<string, GenericPartInfo> TagRequirements = new();
|
||||
|
||||
[ViewVariables]
|
||||
[DataField("componentRequirements")]
|
||||
public readonly Dictionary<string, GenericPartInfo> ComponentRequirements = new();
|
||||
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Stack;
|
||||
using Content.Shared.Construction;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
|
||||
|
||||
@@ -18,7 +13,7 @@ namespace Content.Server.Construction.Components
|
||||
[ViewVariables]
|
||||
public bool HasBoard => BoardContainer?.ContainedEntities.Count != 0;
|
||||
|
||||
[DataField("progress", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>)), ViewVariables]
|
||||
[DataField("progress", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))]
|
||||
public readonly Dictionary<string, int> Progress = new();
|
||||
|
||||
[ViewVariables]
|
||||
@@ -30,7 +25,7 @@ namespace Content.Server.Construction.Components
|
||||
[ViewVariables]
|
||||
public readonly Dictionary<string, int> TagProgress = new();
|
||||
|
||||
[DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>)),ViewVariables]
|
||||
[DataField("requirements", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, MachinePartPrototype>))]
|
||||
public Dictionary<string, int> Requirements = new();
|
||||
|
||||
[ViewVariables]
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Content.Server.Construction.Components
|
||||
[RegisterComponent]
|
||||
public sealed class MachinePartComponent : Component
|
||||
{
|
||||
[ViewVariables]
|
||||
[DataField("part", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
||||
public string PartType { get; private set; } = default!;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user