replacing sound (collection) names with SoundSpecifier - part 1
This commit is contained in:
@@ -18,6 +18,7 @@ using Content.Shared.Audio;
|
||||
using Content.Shared.DragDrop;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Sound;
|
||||
using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -48,6 +49,8 @@ namespace Content.Server.Atmos.Components
|
||||
|
||||
[ViewVariables] private BoundUserInterface? _userInterface;
|
||||
|
||||
[DataField("ruptureSound")] private SoundSpecifier _ruptureSound = new SoundPathSpecifier("Audio/Effects/spray.ogg");
|
||||
|
||||
[DataField("air")] [ViewVariables] public GasMixture Air { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
@@ -282,8 +285,8 @@ namespace Content.Server.Atmos.Components
|
||||
var tileAtmos = Owner.Transform.Coordinates.GetTileAtmosphere();
|
||||
tileAtmos?.AssumeAir(Air);
|
||||
|
||||
SoundSystem.Play(Filter.Pvs(Owner), "Audio/Effects/spray.ogg", Owner.Transform.Coordinates,
|
||||
AudioHelpers.WithVariation(0.125f));
|
||||
if(_ruptureSound.TryGetSound(out var sound))
|
||||
SoundSystem.Play(Filter.Pvs(Owner), sound, Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.125f));
|
||||
|
||||
Owner.QueueDelete();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user