1
0

SignalTimerComponent.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. using Content.Shared.DeviceLinking;
  2. using Robust.Shared.Audio;
  3. using Robust.Shared.Prototypes;
  4. namespace Content.Server.DeviceLinking.Components;
  5. [RegisterComponent]
  6. public sealed partial class SignalTimerComponent : Component
  7. {
  8. [DataField]
  9. public double Delay = 5;
  10. /// <summary>
  11. /// This shows the Label: text box in the UI.
  12. /// </summary>
  13. [DataField]
  14. public bool CanEditLabel = true;
  15. /// <summary>
  16. /// The label, used for TextScreen visuals currently.
  17. /// </summary>
  18. [DataField]
  19. public string Label = string.Empty;
  20. /// <summary>
  21. /// Default max width of a label (how many letters can this render?)
  22. /// </summary>
  23. [DataField]
  24. public int MaxLength = 5;
  25. /// <summary>
  26. /// The port that gets signaled when the timer triggers.
  27. /// </summary>
  28. [DataField]
  29. public ProtoId<SourcePortPrototype> TriggerPort = "Timer";
  30. /// <summary>
  31. /// The port that gets signaled when the timer starts.
  32. /// </summary>
  33. [DataField]
  34. public ProtoId<SourcePortPrototype> StartPort = "Start";
  35. [DataField]
  36. public ProtoId<SinkPortPrototype> Trigger = "Trigger";
  37. /// <summary>
  38. /// If not null, this timer will play this sound when done.
  39. /// </summary>
  40. [DataField]
  41. public SoundSpecifier? DoneSound;
  42. /// <summary>
  43. /// The maximum duration in seconds
  44. /// When a larger number is in the input box, the display will start counting down from this one instead
  45. /// </summary>
  46. [DataField]
  47. public Double MaxDuration = 3599; // 59m 59s
  48. }