Content audio (#20862)

This commit is contained in:
metalgearsloth
2023-10-29 14:58:23 +11:00
committed by GitHub
parent cd280eef6b
commit 9b1b3e03ed
326 changed files with 890 additions and 436 deletions

View File

@@ -7,6 +7,8 @@ using Content.Shared.Mobs.Systems;
using Content.Shared.Movement.Events;
using Content.Shared.Throwing;
using Content.Shared.Toggleable;
using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Map;
using Robust.Shared.Network;
@@ -232,10 +234,10 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
// Sad...
if (_netManager.IsServer && component.Stream == null)
component.Stream = _audio.PlayPredicted(component.Sound, gunUid, null);
component.Stream = _audio.PlayPredicted(component.Sound, gunUid, null)?.Entity;
Dirty(tethered);
Dirty(component);
Dirty(target, tethered);
Dirty(gunUid, component);
}
protected virtual void StopTether(EntityUid gunUid, BaseForceGunComponent component, bool land = true, bool transfer = false)
@@ -269,7 +271,7 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
if (!transfer)
{
component.Stream?.Stop();
_audio.Stop(component.Stream);
component.Stream = null;
}