mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-25 06:35:45 +00:00
tiny fixes
This commit is contained in:
parent
2492cc5533
commit
6dc11d05ce
@ -15,7 +15,6 @@ namespace QSB
|
||||
public static string DefaultServerIP;
|
||||
public static bool DebugMode;
|
||||
public static AssetBundle NetworkAssetBundle;
|
||||
private static GameObject GameObject;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@ -25,10 +24,9 @@ namespace QSB
|
||||
private void Start()
|
||||
{
|
||||
Helper = ModHelper;
|
||||
GameObject = gameObject;
|
||||
|
||||
NetworkAssetBundle = Helper.Assets.LoadBundle("assets/network");
|
||||
QSB.Helper.HarmonyHelper.EmptyMethod<NetworkManagerHUD>("Update");
|
||||
Helper.HarmonyHelper.EmptyMethod<NetworkManagerHUD>("Update");
|
||||
|
||||
gameObject.AddComponent<DebugLog>();
|
||||
gameObject.AddComponent<QSBNetworkManager>();
|
||||
|
@ -150,13 +150,9 @@ namespace QSB
|
||||
public void CleanupNetworkBehaviour(uint netId)
|
||||
{
|
||||
var networkBehaviours = FindObjectsOfType<NetworkBehaviour>()
|
||||
.Where(x => x.netId.Value == netId);
|
||||
.Where(x => x != null && x.netId.Value == netId);
|
||||
foreach (var networkBehaviour in networkBehaviours)
|
||||
{
|
||||
if (networkBehaviour == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var transformSync = networkBehaviour.GetComponent<TransformSync.TransformSync>();
|
||||
|
||||
if (transformSync != null)
|
||||
|
@ -20,6 +20,7 @@ namespace QSB.TransformSync
|
||||
{
|
||||
LocalInstance = this;
|
||||
}
|
||||
|
||||
private Transform GetPlayerModel()
|
||||
{
|
||||
return Locator.GetPlayerTransform().Find("Traveller_HEA_Player_v2");
|
||||
|
@ -14,6 +14,7 @@ namespace QSB.TransformSync
|
||||
{
|
||||
LocalInstance = this;
|
||||
}
|
||||
|
||||
private Transform GetShipModel()
|
||||
{
|
||||
return Locator.GetShipTransform();
|
||||
|
@ -29,23 +29,22 @@ namespace QSB.Utility
|
||||
ToHud(message);
|
||||
}
|
||||
|
||||
public static string GenerateTable(List<string> collumsData, List<string> rowData)
|
||||
public static string GenerateTable(List<string> columnsData, List<string> rowData)
|
||||
{
|
||||
var longestKey = collumsData.OrderByDescending(s => s.Length).First();
|
||||
var longestKey = columnsData.OrderByDescending(s => s.Length).First();
|
||||
var longestValue = rowData.OrderByDescending(s => s.Length).First();
|
||||
var longestObject = (longestKey.Length > longestValue.Length) ? longestKey : longestValue;
|
||||
string collums = "|";
|
||||
string data = "|";
|
||||
foreach (var item in collumsData)
|
||||
var columns = "|";
|
||||
var data = "|";
|
||||
foreach (var item in columnsData)
|
||||
{
|
||||
collums += " " + item.PadRight(longestObject.Length) + " |";
|
||||
|
||||
columns += " " + item.PadRight(longestObject.Length) + " |";
|
||||
}
|
||||
foreach (var item in rowData)
|
||||
{
|
||||
data += " " + item.PadRight(longestObject.Length) + " |";
|
||||
}
|
||||
return collums + Environment.NewLine + data;
|
||||
return columns + Environment.NewLine + data;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user