SoundOnOverloadComponent.cs 892 B

1234567891011121314151617181920212223242526
  1. using Content.Server.DeviceLinking.Systems;
  2. using Robust.Shared.Audio;
  3. namespace Content.Server.DeviceLinking.Components.Overload;
  4. /// <summary>
  5. /// Plays a sound when a device link overloads.
  6. /// An overload happens when a device link sink is invoked to many times per tick
  7. /// and it raises a <see cref="Content.Server.DeviceLinking.Events.DeviceLinkOverloadedEvent"/>
  8. /// </summary>
  9. [RegisterComponent]
  10. [Access(typeof(DeviceLinkOverloadSystem))]
  11. public sealed partial class SoundOnOverloadComponent : Component
  12. {
  13. /// <summary>
  14. /// Sound to play when the device overloads
  15. /// </summary>
  16. [DataField("sound")]
  17. public SoundSpecifier? OverloadSound = new SoundPathSpecifier("/Audio/Items/Defib/defib_zap.ogg");
  18. /// <summary>
  19. /// Modifies the volume the sound is played at
  20. /// </summary>
  21. [DataField("volumeModifier")]
  22. public float VolumeModifier;
  23. }