EmitSoundOnActivateComponent.cs 871 B

12345678910111213141516171819202122
  1. using Robust.Shared.GameStates;
  2. namespace Content.Shared.Sound.Components;
  3. /// <summary>
  4. /// Simple sound emitter that emits sound on ActivateInWorld
  5. /// </summary>
  6. [RegisterComponent, NetworkedComponent]
  7. public sealed partial class EmitSoundOnActivateComponent : BaseEmitSoundComponent
  8. {
  9. /// <summary>
  10. /// Whether or not to mark an interaction as handled after playing the sound. Useful if this component is
  11. /// used to play sound for some other component with activation functionality.
  12. /// </summary>
  13. /// <remarks>
  14. /// If false, you should be confident that the interaction will also be handled by some other system, as
  15. /// otherwise this might enable sound spamming, as use-delays are only initiated if the interaction was
  16. /// handled.
  17. /// </remarks>
  18. [DataField("handle")]
  19. public bool Handle = true;
  20. }