2022-09-26 16:18:31 -04:00
|
|
|
using Content.Shared.Construction.Prototypes;
|
2023-01-16 11:53:23 -05:00
|
|
|
using Robust.Shared.GameStates;
|
2022-09-26 16:18:31 -04:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
2023-01-16 11:53:23 -05:00
|
|
|
namespace Content.Shared.Construction.Components
|
2020-12-03 22:49:00 +01:00
|
|
|
{
|
2023-01-16 11:53:23 -05:00
|
|
|
[RegisterComponent, NetworkedComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class MachinePartComponent : Component
|
2020-12-03 22:49:00 +01:00
|
|
|
{
|
2022-09-26 16:18:31 -04:00
|
|
|
[DataField("part", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
|
|
|
|
public string PartType { get; private set; } = default!;
|
2020-12-03 22:49:00 +01:00
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-03-05 01:08:38 +01:00
|
|
|
[DataField("rating")]
|
|
|
|
|
public int Rating { get; private set; } = 1;
|
2023-01-15 21:57:59 +13:00
|
|
|
|
|
|
|
|
/// <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;
|
2020-12-03 22:49:00 +01:00
|
|
|
}
|
|
|
|
|
}
|