Remove field: from DataField attributes (#3932)
This commit is contained in:
@@ -17,14 +17,14 @@ namespace Content.Shared.GameObjects.Components.Body.Preset
|
||||
public class BodyPresetPrototype : IPrototype
|
||||
{
|
||||
[ViewVariables]
|
||||
[field: DataField("id", required: true)]
|
||||
[DataField("id", required: true)]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[field: DataField("partIDs")]
|
||||
[DataField("partIDs")]
|
||||
private Dictionary<string, string> _partIDs = new();
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("name")]
|
||||
[DataField("name")]
|
||||
public string Name { get; } = string.Empty;
|
||||
|
||||
[ViewVariables]
|
||||
|
||||
@@ -33,11 +33,11 @@ namespace Content.Shared.GameObjects.Components.Body
|
||||
public override uint? NetID => ContentNetIDs.BODY;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("template", required: true)]
|
||||
[DataField("template", required: true)]
|
||||
private string? TemplateId { get; } = default;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("preset", required: true)]
|
||||
[DataField("preset", required: true)]
|
||||
private string? PresetId { get; } = default;
|
||||
|
||||
[ViewVariables]
|
||||
|
||||
@@ -16,28 +16,28 @@ namespace Content.Shared.GameObjects.Components.Body.Template
|
||||
[Serializable, NetSerializable]
|
||||
public class BodyTemplatePrototype : IPrototype, ISerializationHooks
|
||||
{
|
||||
[field: DataField("slots")]
|
||||
[DataField("slots")]
|
||||
private Dictionary<string, BodyPartType> _slots = new();
|
||||
|
||||
[field: DataField("connections")]
|
||||
[DataField("connections")]
|
||||
private Dictionary<string, List<string>> _rawConnections = new();
|
||||
|
||||
[field: DataField("layers")]
|
||||
[DataField("layers")]
|
||||
private Dictionary<string, string> _layers = new();
|
||||
|
||||
[field: DataField("mechanismLayers")]
|
||||
[DataField("mechanismLayers")]
|
||||
private Dictionary<string, string> _mechanismLayers = new();
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("id", required: true)]
|
||||
[DataField("id", required: true)]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("name")]
|
||||
[DataField("name")]
|
||||
public string Name { get; } = string.Empty;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("centerSlot")]
|
||||
[DataField("centerSlot")]
|
||||
public string CenterSlot { get; } = string.Empty;
|
||||
|
||||
[ViewVariables]
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Shared.GameObjects.Components.Chemistry
|
||||
{
|
||||
public override string Name => "Reactive";
|
||||
|
||||
[field: DataField("reactions", true, serverOnly:true)]
|
||||
[DataField("reactions", true, serverOnly:true)]
|
||||
public ReagentEntityReaction[] Reactions { get; } = Array.Empty<ReagentEntityReaction>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Content.Shared.GameObjects.Components.Chemistry.ReagentDispenser
|
||||
private List<string> _inventory = new();
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("id", required: true)]
|
||||
[DataField("id", required: true)]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
public List<string> Inventory => _inventory;
|
||||
|
||||
@@ -78,11 +78,11 @@ namespace Content.Shared.GameObjects.Components
|
||||
public class CrayonDecalPrototype : IPrototype
|
||||
{
|
||||
[ViewVariables]
|
||||
[field: DataField("id", required: true)]
|
||||
[DataField("id", required: true)]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[field: DataField("spritePath")] public string SpritePath { get; } = string.Empty;
|
||||
[DataField("spritePath")] public string SpritePath { get; } = string.Empty;
|
||||
|
||||
[field: DataField("decals")] public List<string> Decals { get; } = new();
|
||||
[DataField("decals")] public List<string> Decals { get; } = new();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Content.Shared.GameObjects.Components
|
||||
[ViewVariables] public int AvailableSpace => MaxCount - Count;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("stackType")]
|
||||
[DataField("stackType")]
|
||||
public string StackTypeId { get; } = string.Empty;
|
||||
|
||||
public StackPrototype StackType => _prototypeManager.Index<StackPrototype>(StackTypeId);
|
||||
|
||||
@@ -11,39 +11,39 @@ namespace Content.Shared.GameObjects.Components.Weapons.Melee
|
||||
public sealed class MeleeWeaponAnimationPrototype : IPrototype
|
||||
{
|
||||
[ViewVariables]
|
||||
[field: DataField("id", required: true)]
|
||||
[DataField("id", required: true)]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("state")]
|
||||
[DataField("state")]
|
||||
public string State { get; } = string.Empty;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("prototype")]
|
||||
[DataField("prototype")]
|
||||
public string Prototype { get; } = "WeaponArc";
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("length")]
|
||||
[DataField("length")]
|
||||
public TimeSpan Length { get; } = TimeSpan.FromSeconds(0.5f);
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("speed")]
|
||||
[DataField("speed")]
|
||||
public float Speed { get; } = 1;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("color")]
|
||||
[DataField("color")]
|
||||
public Vector4 Color { get; } = new(1,1,1,1);
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("colorDelta")]
|
||||
[DataField("colorDelta")]
|
||||
public Vector4 ColorDelta { get; } = Vector4.Zero;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("arcType")]
|
||||
[DataField("arcType")]
|
||||
public WeaponArcType ArcType { get; } = WeaponArcType.Slash;
|
||||
|
||||
[ViewVariables]
|
||||
[field: DataField("width")]
|
||||
[DataField("width")]
|
||||
public float Width { get; } = 90;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user