Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
@@ -10,6 +10,8 @@ using Content.Shared.Mech.Equipment.Components;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Wall;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
@@ -149,7 +151,7 @@ public sealed class MechGrabberSystem : EntitySystem
|
||||
return;
|
||||
|
||||
args.Handled = true;
|
||||
component.AudioStream = _audio.PlayPvs(component.GrabSound, uid);
|
||||
component.AudioStream = _audio.PlayPvs(component.GrabSound, uid).Value.Entity;
|
||||
_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.GrabDelay, new GrabberDoAfterEvent(), uid, target: target, used: uid)
|
||||
{
|
||||
BreakOnTargetMove = true,
|
||||
@@ -161,7 +163,7 @@ public sealed class MechGrabberSystem : EntitySystem
|
||||
{
|
||||
if (args.Cancelled)
|
||||
{
|
||||
component.AudioStream?.Stop();
|
||||
component.AudioStream = _audio.Stop(component.AudioStream);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user