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

@@ -10,6 +10,8 @@ using Content.Shared.Storage;
using Robust.Shared.Containers;
using Robust.Shared.Utility;
using Content.Shared.Wires;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Collections;
namespace Content.Server.Construction;
@@ -34,7 +36,7 @@ public sealed class PartExchangerSystem : EntitySystem
{
if (args.Cancelled)
{
component.AudioStream?.Stop();
component.AudioStream = _audio.Stop(component.AudioStream);
return;
}
@@ -168,7 +170,7 @@ public sealed class PartExchangerSystem : EntitySystem
return;
}
component.AudioStream = _audio.PlayPvs(component.ExchangeSound, uid);
component.AudioStream = _audio.PlayPvs(component.ExchangeSound, uid).Value.Entity;
_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.ExchangeDuration, new ExchangerDoAfterEvent(), uid, target: args.Target, used: uid)
{