Add linter support to StackPrototype, fix linter errors.

This commit is contained in:
Vera Aguilera Puerto
2021-09-27 13:08:18 +02:00
parent 95d6f924cc
commit 35067b3a3e
4 changed files with 13 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
@@ -12,16 +13,23 @@ namespace Content.Shared.Stacks
[DataField("id", required: true)]
public string ID { get; } = default!;
/// <summary>
/// Human-readable name for this stack type e.g. "Steel"
/// </summary>
/// <remarks>This is a localization string ID.</remarks>
[DataField("name")]
public string Name { get; } = string.Empty;
/// <summary>
/// An icon that will be used to represent this stack type.
/// </summary>
[DataField("icon")]
public SpriteSpecifier? Icon { get; } = null;
/// <summary>
/// The entity id that will be spawned by default from this stack.
/// </summary>
[DataField("spawn", required: true)]
[DataField("spawn", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string Spawn { get; } = string.Empty;
}
}