Files
OldThink/Content.Server/DeviceLinking/Components/SignalTimerComponent.cs
rhailrake 83160bb89f [tweak] brig timers now announce
# Conflicts:
#	Content.Server/DeviceLinking/Systems/SignalTimerSystem.cs
#	Content.Server/MachineLinking/Components/SignalTimerComponent.cs
#	Resources/Prototypes/Entities/Structures/Wallmounts/timer.yml
2024-01-10 21:50:12 +07:00

56 lines
1.8 KiB
C#

using Content.Shared.DeviceLinking;
using Content.Shared.Radio;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.DeviceLinking.Components;
[RegisterComponent]
public sealed partial class SignalTimerComponent : Component
{
[DataField, ViewVariables(VVAccess.ReadWrite)]
public double Delay = 5;
/// <summary>
/// This shows the Label: text box in the UI.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool CanEditLabel = true;
/// <summary>
/// The label, used for TextScreen visuals currently.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string Label = string.Empty;
/// <summary>
/// The port that gets signaled when the timer triggers.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public ProtoId<SourcePortPrototype> TriggerPort = "Timer";
/// <summary>
/// The port that gets signaled when the timer starts.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public ProtoId<SourcePortPrototype> StartPort = "Start";
[DataField, ViewVariables(VVAccess.ReadWrite)]
public ProtoId<SinkPortPrototype> Trigger = "Trigger";
/// <summary>
/// If not null, this timer will play this sound when done.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier? DoneSound;
[DataField("timerCanAnnounce")]
[ViewVariables(VVAccess.ReadWrite)]
public bool TimerCanAnnounce;
[DataField("SecChannel", customTypeSerializer: typeof(PrototypeIdSerializer<RadioChannelPrototype>))]
public static string SecChannel = "Security";
}