mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-10 19:01:13 +03:00
* Replace WithVolume() with AddVolume(), Remove AudioHelpers.WithVariation(), Use specifier options for audio params * Undo switching to AudioParams.AddVariation() * Replace AudioHelpers.WithVariation with AudioParams.AddVariation() * Test AudioParams.AddVariation() and change input parameters to sound like previous AudioHelpers.WithVariation() * Fix build error * Fix build error v2 * Remove DoAfter * fixes --------- Co-authored-by: AJCM-git <ajcm_mail@disroot.org>
21 lines
676 B
C#
21 lines
676 B
C#
using Content.Shared.Audio;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Gatherable.Components;
|
|
|
|
/// <summary>
|
|
/// Plays the specified sound when this entity is gathered.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
[Access(typeof(GatherableSystem))]
|
|
public sealed partial class SoundOnGatherComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// Sound to play when this entity is gathered.
|
|
/// </summary>
|
|
[DataField]
|
|
public SoundSpecifier Sound = new SoundPathSpecifier("/Audio/Effects/break_stone.ogg", AudioParams.Default
|
|
.WithVariation(SharedContentAudioSystem.DefaultVariation)
|
|
.AddVolume(-3f));
|
|
}
|