Remove redundant read-only VV from datafields (#12626)

This commit is contained in:
DrSmugleaf
2022-11-16 20:22:11 +01:00
committed by GitHub
parent fb892cb374
commit 7fbc2608e8
179 changed files with 171 additions and 462 deletions

View File

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

View File

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

View File

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

View File

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

View File

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