[Entity] Brig Timers (#15285)
* brigtimer * ok * TextScreen w timer implementation * second commit * working brig timer * signal timers near completion * soon done * removed licenses, fixes noRotation on screens, minor edits * no message * no message * removed my last todos * removed csproj.rej?? * missed a thing with .yml and tests * fix tests * Update base_structureairlocks.yml * timespan type serialize * activation turned into comp * sloth review * Update timer.yml * small changes --------- Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com> Co-authored-by: rolfero <45628623+rolfero@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Content.Shared.MachineLinking;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.MachineLinking.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class SignalTimerComponent : Component
|
||||
{
|
||||
[DataField("delay"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public double Delay = 5;
|
||||
|
||||
/// <summary>
|
||||
/// This shows the Label: text box in the UI.
|
||||
/// </summary>
|
||||
[DataField("canEditLabel"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool CanEditLabel = true;
|
||||
|
||||
/// <summary>
|
||||
/// The label, used for TextScreen visuals currently.
|
||||
/// </summary>
|
||||
[DataField("label"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string Label = "";
|
||||
|
||||
/// <summary>
|
||||
/// The port that gets signaled when the timer triggers.
|
||||
/// </summary>
|
||||
[DataField("triggerPort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string TriggerPort = "Timer";
|
||||
|
||||
/// <summary>
|
||||
/// The port that gets signaled when the timer starts.
|
||||
/// </summary>
|
||||
[DataField("startPort", customTypeSerializer: typeof(PrototypeIdSerializer<TransmitterPortPrototype>)), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string StartPort = "Start";
|
||||
|
||||
/// <summary>
|
||||
/// If not null, this timer will play this sound when done.
|
||||
/// </summary>
|
||||
[DataField("doneSound"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public SoundSpecifier? DoneSound;
|
||||
}
|
||||
Reference in New Issue
Block a user