Unrevert audio (#21330)

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
metalgearsloth
2023-11-27 22:12:34 +11:00
committed by GitHub
parent d3486d3b25
commit 269c93245d
288 changed files with 848 additions and 427 deletions

View File

@@ -23,6 +23,12 @@ using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.Player;
using Robust.Shared.Timing;
using Content.Shared.DoAfter;
using Content.Server.Emp;
using Content.Server.DeviceLinking.Events;
using Content.Server.DeviceLinking.Systems;
using Content.Shared.Inventory;
using Robust.Shared.Audio.Systems;
namespace Content.Server.Light.EntitySystems
{
@@ -130,7 +136,7 @@ namespace Content.Server.Light.EntitySystems
if (damage != null)
_adminLogger.Add(LogType.Damaged, $"{ToPrettyString(args.User):user} burned their hand on {ToPrettyString(args.Target):target} and received {damage.Total:damage} damage");
_audio.Play(light.BurnHandSound, Filter.Pvs(uid), uid, true);
_audio.PlayEntity(light.BurnHandSound, Filter.Pvs(uid), uid, true);
args.Handled = true;
return;
@@ -281,7 +287,7 @@ namespace Content.Server.Light.EntitySystems
if (time > light.LastThunk + ThunkDelay)
{
light.LastThunk = time;
_audio.Play(light.TurnOnSound, Filter.Pvs(uid), uid, true, AudioParams.Default.WithVolume(-10f));
_audio.PlayEntity(light.TurnOnSound, Filter.Pvs(uid), uid, true, AudioParams.Default.WithVolume(-10f));
}
}
else
@@ -343,7 +349,9 @@ namespace Content.Server.Light.EntitySystems
private void OnPowerChanged(EntityUid uid, PoweredLightComponent component, ref PowerChangedEvent args)
{
// TODO: Power moment
if (MetaData(uid).EntityPaused)
var metadata = MetaData(uid);
if (metadata.EntityPaused || TerminatingOrDeleted(uid, metadata))
return;
UpdateLight(uid, component);