Files
tbd-station-14/Content.Server/Construction/Components/MachinePartComponent.cs
2023-01-15 00:57:59 -08:00

24 lines
979 B
C#

using Content.Shared.Construction.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Construction.Components
{
[RegisterComponent]
public sealed class MachinePartComponent : Component
{
[DataField("part", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
public string PartType { get; private set; } = default!;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("rating")]
public int Rating { get; private set; } = 1;
/// <summary>
/// This number is used in tests to ensure that you can't use high quality machines for arbitrage. In
/// principle there is nothing wrong with using higher quality parts, but you have to be careful to not
/// allow them to be put into a lathe or something like that.
/// </summary>
public const int MaxRating = 4;
}
}