Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
@@ -14,6 +14,7 @@ using Content.Shared.Nuke;
|
||||
using Content.Shared.Popups;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
@@ -216,7 +217,7 @@ public sealed class NukeSystem : EntitySystem
|
||||
|
||||
private void OnClearButtonPressed(EntityUid uid, NukeComponent component, NukeKeypadClearMessage args)
|
||||
{
|
||||
_audio.Play(component.KeypadPressSound, Filter.Pvs(uid), uid, true);
|
||||
_audio.PlayEntity(component.KeypadPressSound, Filter.Pvs(uid), uid, true);
|
||||
|
||||
if (component.Status != NukeStatus.AWAIT_CODE)
|
||||
return;
|
||||
@@ -334,12 +335,12 @@ public sealed class NukeSystem : EntitySystem
|
||||
{
|
||||
component.Status = NukeStatus.AWAIT_ARM;
|
||||
component.RemainingTime = component.Timer;
|
||||
_audio.Play(component.AccessGrantedSound, Filter.Pvs(uid), uid, true);
|
||||
_audio.PlayEntity(component.AccessGrantedSound, Filter.Pvs(uid), uid, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
component.EnteredCode = "";
|
||||
_audio.Play(component.AccessDeniedSound, Filter.Pvs(uid), uid, true);
|
||||
_audio.PlayEntity(component.AccessDeniedSound, Filter.Pvs(uid), uid, true);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -409,7 +410,7 @@ public sealed class NukeSystem : EntitySystem
|
||||
// Don't double-dip on the octave shifting
|
||||
component.LastPlayedKeypadSemitones = number == 0 ? component.LastPlayedKeypadSemitones : semitoneShift;
|
||||
|
||||
_audio.Play(component.KeypadPressSound, Filter.Pvs(uid), uid, true, AudioHelpers.ShiftSemitone(semitoneShift).WithVolume(-5f));
|
||||
_audio.PlayEntity(component.KeypadPressSound, Filter.Pvs(uid), uid, true, AudioHelpers.ShiftSemitone(semitoneShift).WithVolume(-5f));
|
||||
}
|
||||
|
||||
public string GenerateRandomNumberString(int length)
|
||||
@@ -500,7 +501,7 @@ public sealed class NukeSystem : EntitySystem
|
||||
|
||||
// disable sound and reset it
|
||||
component.PlayedAlertSound = false;
|
||||
component.AlertAudioStream?.Stop();
|
||||
component.AlertAudioStream = _audio.Stop(component.AlertAudioStream);
|
||||
|
||||
// turn off the spinny light
|
||||
_pointLight.SetEnabled(uid, false);
|
||||
|
||||
Reference in New Issue
Block a user