Files
tbd-station-14/Content.Server/Engineering/Components/DisassembleOnActivateComponent.cs
2021-06-09 22:19:39 +02:00

29 lines
945 B
C#

#nullable enable
using System.Threading;
using Content.Shared.NetIDs;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
namespace Content.Server.Engineering.Components
{
[RegisterComponent]
public class DisassembleOnActivateComponent : Component
{
public override string Name => "DisassembleOnActivate";
public override uint? NetID => ContentNetIDs.DISASSEMBLE_ON_ACTIVATE;
[ViewVariables]
[DataField("prototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? Prototype { get; }
[ViewVariables]
[DataField("doAfter")]
public float DoAfterTime = 0;
public CancellationTokenSource TokenSource { get; } = new();
}
}