1
0

SoundOnGatherComponent.cs 616 B

12345678910111213141516171819
  1. using Content.Shared.Audio;
  2. using Robust.Shared.Audio;
  3. namespace Content.Server.Gatherable.Components;
  4. /// <summary>
  5. /// Plays the specified sound when this entity is gathered.
  6. /// </summary>
  7. [RegisterComponent, Access(typeof(GatherableSystem))]
  8. public sealed partial class SoundOnGatherComponent : Component
  9. {
  10. [ViewVariables(VVAccess.ReadWrite), DataField("sound")]
  11. public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Effects/break_stone.ogg")
  12. {
  13. Params = AudioParams.Default
  14. .WithVariation(SharedContentAudioSystem.DefaultVariation)
  15. .WithVolume(-3f),
  16. };
  17. }