2023-08-21 07:05:43 +10:00
|
|
|
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))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class SoundOnGatherComponent : Component
|
2023-08-21 07:05:43 +10:00
|
|
|
{
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite), DataField("sound")]
|
|
|
|
|
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Effects/break_stone.ogg")
|
|
|
|
|
{
|
|
|
|
|
Params = AudioParams.Default
|
|
|
|
|
.WithVariation(SharedContentAudioSystem.DefaultVariation)
|
|
|
|
|
.WithVolume(-3f),
|
|
|
|
|
};
|
|
|
|
|
}
|