Audio fixes (#22324)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
using Content.Server.GameTicking.Events;
|
||||
using Content.Shared.Audio;
|
||||
using Content.Shared.GameTicking;
|
||||
using Robust.Server.Audio;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Components;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Audio;
|
||||
@@ -14,10 +16,16 @@ public sealed class ContentAudioSystem : SharedContentAudioSystem
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundCleanup);
|
||||
SubscribeLocalEvent<RoundStartingEvent>(OnRoundStart);
|
||||
_protoManager.PrototypesReloaded += OnProtoReload;
|
||||
}
|
||||
|
||||
private void OnRoundCleanup(RoundRestartCleanupEvent ev)
|
||||
{
|
||||
SilenceAudio();
|
||||
}
|
||||
|
||||
private void OnProtoReload(PrototypesReloadedEventArgs obj)
|
||||
{
|
||||
if (!obj.ByType.ContainsKey(typeof(AudioPresetPrototype)))
|
||||
|
||||
Reference in New Issue
Block a user