From 0c939d485eca2e0c15bfc05e0602635f39974c45 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Thu, 7 Apr 2022 11:03:52 -0700 Subject: [PATCH] DebugGui: separate debug flag for ghost ai lines/labels --- QSB/Utility/DebugGUI.cs | 49 +++++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/QSB/Utility/DebugGUI.cs b/QSB/Utility/DebugGUI.cs index d230d47a..069d865a 100644 --- a/QSB/Utility/DebugGUI.cs +++ b/QSB/Utility/DebugGUI.cs @@ -1,4 +1,5 @@ using QSB.ClientServerStateSync; +using QSB.EchoesOfTheEye.Ghosts.WorldObjects; using QSB.Player; using QSB.QuantumSync.WorldObjects; using QSB.ShipSync; @@ -264,16 +265,24 @@ internal class DebugGUI : MonoBehaviour, IAddComponentOnStart private static void DrawWorldObjectLabels() { - if (!QSBCore.DebugSettings.DrawLabels) + if (QSBCore.DebugSettings.DrawLabels) { - return; - } - - foreach (var obj in QSBWorldSync.GetWorldObjects()) - { - if (obj.ShouldDisplayDebug()) + foreach (var obj in QSBWorldSync.GetWorldObjects()) { - DrawLabel(obj.AttachedObject.transform, obj.ReturnLabel()); + if (obj.ShouldDisplayDebug()) + { + DrawLabel(obj.AttachedObject.transform, obj.ReturnLabel()); + } + } + } + else if (QSBCore.DebugSettings.DrawGhostAI) + { + foreach (var obj in QSBWorldSync.GetWorldObjects()) + { + if (obj.ShouldDisplayDebug()) + { + DrawLabel(obj.AttachedObject.transform, obj.ReturnLabel()); + } } } } @@ -282,16 +291,24 @@ internal class DebugGUI : MonoBehaviour, IAddComponentOnStart private static void DrawWorldObjectLines() { - if (!QSBCore.DebugSettings.DrawLines) + if (QSBCore.DebugSettings.DrawLines) { - return; - } - - foreach (var obj in QSBWorldSync.GetWorldObjects()) - { - if (obj.ShouldDisplayDebug()) + foreach (var obj in QSBWorldSync.GetWorldObjects()) { - obj.DisplayLines(); + if (obj.ShouldDisplayDebug()) + { + obj.DisplayLines(); + } + } + } + else if (QSBCore.DebugSettings.DrawGhostAI) + { + foreach (var obj in QSBWorldSync.GetWorldObjects()) + { + if (obj.ShouldDisplayDebug()) + { + obj.DisplayLines(); + } } } }