Replace string data fields with LocId where relevant (#20883)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Array;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Materials
|
||||
{
|
||||
@@ -17,7 +16,7 @@ namespace Content.Shared.Materials
|
||||
public string[]? Parents { get; }
|
||||
|
||||
[ViewVariables]
|
||||
[AbstractDataFieldAttribute]
|
||||
[AbstractDataField]
|
||||
public bool Abstract { get; } = false;
|
||||
|
||||
[ViewVariables]
|
||||
@@ -29,10 +28,10 @@ namespace Content.Shared.Materials
|
||||
/// between the material and physical entities you can carry,
|
||||
/// include which stack we should spawn by default.
|
||||
/// </summary>
|
||||
[DataField("stackEntity", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string? StackEntity;
|
||||
[DataField]
|
||||
public ProtoId<EntityPrototype>? StackEntity;
|
||||
|
||||
[DataField("name")]
|
||||
[DataField]
|
||||
public string Name = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
@@ -40,22 +39,22 @@ namespace Content.Shared.Materials
|
||||
/// Lathe recipe tooltips and material storage display use this to let you change a material to sound nicer.
|
||||
/// For example, 5 bars of gold is better than 5 sheets of gold.
|
||||
/// </summary>
|
||||
[DataField("unit")]
|
||||
public string Unit = "materials-unit-sheet";
|
||||
[DataField]
|
||||
public LocId Unit = "materials-unit-sheet";
|
||||
|
||||
[DataField("color")]
|
||||
[DataField]
|
||||
public Color Color { get; private set; } = Color.Gray;
|
||||
|
||||
/// <summary>
|
||||
/// An icon used to represent the material in graphic interfaces.
|
||||
/// </summary>
|
||||
[DataField("icon")]
|
||||
[DataField]
|
||||
public SpriteSpecifier Icon { get; private set; } = SpriteSpecifier.Invalid;
|
||||
|
||||
/// <summary>
|
||||
/// The price per cm3.
|
||||
/// </summary>
|
||||
[DataField("price", required: true)]
|
||||
[DataField(required: true)]
|
||||
public double Price = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user