Files
OldThink/Content.Server/Power/Components/CableComponent.cs

39 lines
1.3 KiB
C#
Raw Normal View History

2022-01-14 03:21:30 +13:00
using Content.Server.Power.EntitySystems;
using Content.Shared.Tools;
2022-01-14 03:21:30 +13:00
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Power.Components
{
/// <summary>
/// Allows the attached entity to be destroyed by a cutting tool, dropping a piece of cable.
/// </summary>
[RegisterComponent]
[Access(typeof(CableSystem))]
public sealed partial class CableComponent : Component
{
2022-01-14 03:21:30 +13:00
[DataField("cableDroppedOnCutPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string CableDroppedOnCutPrototype = "CableHVStack1";
[DataField("cuttingQuality", customTypeSerializer:typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
2022-01-14 03:21:30 +13:00
public string CuttingQuality = "Cutting";
/// <summary>
/// Checked by <see cref="CablePlacerComponent"/> to determine if there is
/// already a cable of a type on a tile.
/// </summary>
[DataField("cableType")]
2022-01-14 03:21:30 +13:00
public CableType CableType = CableType.HighVoltage;
2022-01-14 03:21:30 +13:00
[DataField("cuttingDelay")]
2023-04-29 23:50:31 +02:00
public float CuttingDelay = 1f;
}
public enum CableType
{
HighVoltage,
MediumVoltage,
Apc,
}
}