mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-03-09 22:14:26 +00:00
destroy debug actions/gui if we're not debugging
This commit is contained in:
parent
74a1c3cb46
commit
292b49deb5
@ -93,10 +93,10 @@ namespace QSB.Anglerfish.TransformSync
|
||||
|
||||
protected override void OnRenderObject()
|
||||
{
|
||||
if (!WorldObjectManager.AllObjectsReady
|
||||
|| !QSBCore.ShowLinesInDebug
|
||||
if (!QSBCore.ShowLinesInDebug
|
||||
|| !WorldObjectManager.AllObjectsReady
|
||||
|| !IsReady
|
||||
|| ReferenceTransform == null
|
||||
|| AttachedObject == null
|
||||
|| AttachedObject.IsSuspended())
|
||||
{
|
||||
return;
|
||||
|
@ -86,7 +86,7 @@ namespace QSB.Animation.Player.Thrusters
|
||||
|
||||
private void OnRenderObject()
|
||||
{
|
||||
if (!WorldObjectManager.AllObjectsReady || !QSBCore.ShowLinesInDebug)
|
||||
if (!QSBCore.ShowLinesInDebug || !WorldObjectManager.AllObjectsReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -141,9 +141,10 @@ namespace QSB.JellyfishSync.TransformSync
|
||||
|
||||
protected override void OnRenderObject()
|
||||
{
|
||||
if (!WorldObjectManager.AllObjectsReady
|
||||
|| !QSBCore.ShowLinesInDebug
|
||||
if (!QSBCore.ShowLinesInDebug
|
||||
|| !WorldObjectManager.AllObjectsReady
|
||||
|| !IsReady
|
||||
|| AttachedObject == null
|
||||
|| ReferenceTransform == null
|
||||
|| AttachedObject.IsSuspended())
|
||||
{
|
||||
|
@ -262,8 +262,8 @@ namespace QSB.Player.TransformSync
|
||||
{
|
||||
base.OnRenderObject();
|
||||
|
||||
if (!WorldObjectManager.AllObjectsReady
|
||||
|| !QSBCore.ShowLinesInDebug
|
||||
if (!QSBCore.ShowLinesInDebug
|
||||
|| !WorldObjectManager.AllObjectsReady
|
||||
|| !IsReady
|
||||
|| ReferenceTransform == null)
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ namespace QSB.QuantumSync
|
||||
|
||||
public void OnRenderObject()
|
||||
{
|
||||
if (!AllObjectsReady || !QSBCore.ShowLinesInDebug)
|
||||
if (!QSBCore.ShowLinesInDebug || !AllObjectsReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -273,9 +273,10 @@ namespace QSB.Syncs
|
||||
|
||||
protected virtual void OnRenderObject()
|
||||
{
|
||||
if (!WorldObjectManager.AllObjectsReady
|
||||
|| !QSBCore.ShowLinesInDebug
|
||||
if (!QSBCore.ShowLinesInDebug
|
||||
|| !WorldObjectManager.AllObjectsReady
|
||||
|| !IsReady
|
||||
|| AttachedObject == null
|
||||
|| ReferenceTransform == null)
|
||||
{
|
||||
return;
|
||||
@ -297,6 +298,11 @@ namespace QSB.Syncs
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
if (!QSBCore.ShowDebugLabels)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (AttachedObject != null)
|
||||
{
|
||||
DebugGUI.DrawLabel(AttachedObject.transform, LogName);
|
||||
|
@ -77,7 +77,7 @@ namespace QSB.Tools.TranslatorTool
|
||||
|
||||
private void OnRenderObject()
|
||||
{
|
||||
if (!WorldObjectManager.AllObjectsReady || !QSBCore.ShowLinesInDebug)
|
||||
if (!QSBCore.ShowLinesInDebug || !WorldObjectManager.AllObjectsReady)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -31,13 +31,16 @@ namespace QSB.Utility
|
||||
|
||||
private void DamageShipElectricalSystem() => ShipManager.Instance.ShipElectricalComponent.SetDamaged(true);
|
||||
|
||||
public void Update()
|
||||
private void Awake()
|
||||
{
|
||||
if (!QSBCore.DebugMode)
|
||||
{
|
||||
return;
|
||||
Destroy(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
/*
|
||||
* 1 - Warp to first player
|
||||
* 2 - Set time flowing
|
||||
|
@ -30,7 +30,16 @@ namespace QSB.Utility
|
||||
private readonly GUIStyle guiGUIStyle = new();
|
||||
private static readonly GUIStyle labelGUIStyle = new();
|
||||
|
||||
private void Awake() => guiGUIStyle.fontSize = 9;
|
||||
private void Awake()
|
||||
{
|
||||
if (!QSBCore.DebugMode)
|
||||
{
|
||||
Destroy(this);
|
||||
return;
|
||||
}
|
||||
|
||||
guiGUIStyle.fontSize = 9;
|
||||
}
|
||||
|
||||
private void WriteLine(int columnID, string text)
|
||||
{
|
||||
@ -72,11 +81,6 @@ namespace QSB.Utility
|
||||
|
||||
public void OnGUI()
|
||||
{
|
||||
if (!QSBCore.DebugMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
guiGUIStyle.normal.textColor = Color.white;
|
||||
GUI.contentColor = Color.white;
|
||||
|
||||
@ -247,11 +251,6 @@ namespace QSB.Utility
|
||||
|
||||
public static void DrawLabel(Transform obj, string label)
|
||||
{
|
||||
if (!QSBCore.ShowDebugLabels)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var camera = Locator.GetPlayerCamera();
|
||||
|
||||
if (camera == null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user