1
0

TimerTriggerVisualizerComponent.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Robust.Client.Animations;
  2. using Robust.Shared.Audio;
  3. namespace Content.Client.Trigger;
  4. [RegisterComponent]
  5. [Access(typeof(TimerTriggerVisualizerSystem))]
  6. public sealed partial class TimerTriggerVisualsComponent : Component
  7. {
  8. /// <summary>
  9. /// The key used to index the priming animation.
  10. /// </summary>
  11. [ViewVariables]
  12. public const string AnimationKey = "priming_animation";
  13. /// <summary>
  14. /// The RSI state used while the device has not been primed.
  15. /// </summary>
  16. [DataField("unprimedSprite")]
  17. [ViewVariables(VVAccess.ReadWrite)]
  18. public string UnprimedSprite = "icon";
  19. /// <summary>
  20. /// The RSI state used when the device is primed.
  21. /// Not VVWrite-able because it's only used at component init to construct the priming animation.
  22. /// </summary>
  23. [DataField("primingSprite")]
  24. public string PrimingSprite = "primed";
  25. /// <summary>
  26. /// The sound played when the device is primed.
  27. /// Not VVWrite-able because it's only used at component init to construct the priming animation.
  28. /// </summary>
  29. [DataField("primingSound")]
  30. public SoundSpecifier? PrimingSound;
  31. /// <summary>
  32. /// The actual priming animation.
  33. /// Constructed at component init from the sprite and sound.
  34. /// </summary>
  35. [ViewVariables(VVAccess.ReadWrite)]
  36. public Animation PrimingAnimation = default!;
  37. }