From ec47033ee222c8e8d3bca8fb4ee27a6b7c3c6c69 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 1 Dec 2023 16:42:33 +1100 Subject: [PATCH] Add more global audio debugging yipee (#22050) --- .../Administration/Commands/PlayGlobalSoundCommand.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs b/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs index 9155bc005c..b983a8f00c 100644 --- a/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs +++ b/Content.Server/Administration/Commands/PlayGlobalSoundCommand.cs @@ -12,6 +12,7 @@ using Robust.Shared.ContentPack; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Spawners; +using Robust.Shared.Timing; using Timer = Robust.Shared.Timing.Timer; namespace Content.Server.Administration.Commands; @@ -64,6 +65,8 @@ public sealed class PlayGlobalAudioCommand : IConsoleCommand shell.WriteLine($"Audio global: {audio?.Component.Global}"); shell.WriteLine($"Audio paused: {entManager.IsPaused(audio?.Entity)}"); shell.WriteLine($"Audio lifetime: {entManager.GetComponent(audio!.Value.Entity).Lifetime}"); + shell.WriteLine($"Can get state: {entManager.CanGetComponentState(entManager.EventBus, audio.Value.Component, shell.Player!)}"); + shell.WriteLine($"Session specific: {entManager.GetComponent(audio.Value.Entity).SessionSpecific}"); if (args.Length > 1 && args[1] == "true") { @@ -71,6 +74,11 @@ public sealed class PlayGlobalAudioCommand : IConsoleCommand entManager.RemoveComponent(ent); Timer.Spawn(600000, () => entManager.DeleteEntity(ent)); } + else + { + var WEH = entManager.GetComponent(audio.Value.Entity); + WEH.Lifetime = 20f; + } } }