Files
tbd-station-14/Content.Server/Gatherable/Components/SoundOnGatherComponent.cs
2023-08-20 14:05:43 -07:00

20 lines
608 B
C#

using Content.Shared.Audio;
using Robust.Shared.Audio;
namespace Content.Server.Gatherable.Components;
/// <summary>
/// Plays the specified sound when this entity is gathered.
/// </summary>
[RegisterComponent, Access(typeof(GatherableSystem))]
public sealed class SoundOnGatherComponent : Component
{
[ViewVariables(VVAccess.ReadWrite), DataField("sound")]
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Effects/break_stone.ogg")
{
Params = AudioParams.Default
.WithVariation(SharedContentAudioSystem.DefaultVariation)
.WithVolume(-3f),
};
}