1
0

ItemToggleActiveSoundComponent.cs 765 B

1234567891011121314151617181920212223
  1. using Robust.Shared.Audio;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Item.ItemToggle.Components;
  4. /// <summary>
  5. /// Handles the active sound being played continuously with some items that are activated (ie e-sword hum).
  6. /// </summary>
  7. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  8. public sealed partial class ItemToggleActiveSoundComponent : Component
  9. {
  10. /// <summary>
  11. /// The continuous noise this item makes when it's activated (like an e-sword's hum).
  12. /// </summary>
  13. [DataField(required: true), AutoNetworkedField]
  14. public SoundSpecifier? ActiveSound;
  15. /// <summary>
  16. /// Used when the item emits sound while active.
  17. /// </summary>
  18. [DataField]
  19. public EntityUid? PlayingStream;
  20. }