add logging of ship stuff

This commit is contained in:
Mister_Nebula 2021-06-18 16:40:05 +01:00
parent 44191efd20
commit c50978b68b

View File

@ -1,10 +1,9 @@
using OWML.Common;
using QSB.Player;
using QSB.Player.TransformSync;
using QSB.ShipSync.TransformSync;
using QSB.Utility;
using QSB.WorldSync;
using QuantumUNET;
using System;
using System.Linq;
using UnityEngine;
@ -58,6 +57,35 @@ namespace QSB.ShipSync
}
QNetworkServer.Spawn(Instantiate(QSBNetworkManager.Instance.ShipPrefab));
}
var shipComponents = Resources.FindObjectsOfTypeAll<ShipComponent>();
var electricalComponents = Resources.FindObjectsOfTypeAll<ElectricalComponent>();
var electricalSystems = Resources.FindObjectsOfTypeAll<ElectricalSystem>();
var shipModules = Resources.FindObjectsOfTypeAll<ShipModule>();
var shipHulls = Resources.FindObjectsOfTypeAll<ShipHull>();
DebugLog.DebugWrite("ShipComponents : ");
PrintAll(shipComponents);
DebugLog.DebugWrite("Electrical Components : ");
PrintAll(electricalComponents);
DebugLog.DebugWrite("Electrical Systems : ");
PrintAll(electricalSystems);
DebugLog.DebugWrite("Ship Modules : ");
PrintAll(shipModules);
DebugLog.DebugWrite("Ship Hulls : ");
PrintAll(shipHulls);
}
private void PrintAll(Array array)
{
foreach(var item in array)
{
DebugLog.DebugWrite($" - {(item as MonoBehaviour).name}");
}
}
}
}