Compatibility with the ToadicusTools refactor
Compatibility with the ToadicusTools refactor

--- a/AdaptiveDockingNode.csproj
+++ b/AdaptiveDockingNode.csproj
@@ -72,23 +72,50 @@
   <ItemGroup>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="ModuleAdaptiveDockingNode.cs" />
-    <Compile Include="..\ToadicusTools\Tools.cs">
-      <Link>ToadicusTools\Tools.cs</Link>
+    <Compile Include="..\ToadicusTools\Logging.cs">
+      <Link>ToadicusTools\Logging.cs</Link>
     </Compile>
-    <Compile Include="..\ToadicusTools\PartExtensions.cs">
+    <Compile Include="..\ToadicusTools\Text\Extensions.cs">
+      <Link>ToadicusTools\Extensions.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\Text\PooledStringBuilder.cs">
+      <Link>ToadicusTools\PooledStringBuilder.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\Text\SIFormatProvider.cs">
+      <Link>ToadicusTools\SIFormatProvider.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\Text\TextTools.cs">
+      <Link>ToadicusTools\TextTools.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\APIHelpers\PooledObject.cs">
+      <Link>ToadicusTools\PooledObject.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\Enums.cs">
+      <Link>Enums.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\Extensions\PartExtensions.cs">
       <Link>ToadicusTools\PartExtensions.cs</Link>
     </Compile>
-    <Compile Include="..\ToadicusTools\VesselExtensions.cs">
+    <Compile Include="..\ToadicusTools\Debug\PooledDebugLogger.cs">
+      <Link>ToadicusTools\PooledDebugLogger.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\Extensions\VesselExtensions.cs">
       <Link>ToadicusTools\VesselExtensions.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\Extensions\ComponentExtensions.cs">
+      <Link>ToadicusTools\ComponentExtensions.cs</Link>
     </Compile>
     <Compile Include="..\ToadicusTools\VectorTools.cs">
       <Link>ToadicusTools\VectorTools.cs</Link>
     </Compile>
+    <Compile Include="..\ToadicusTools\MathTools.cs">
+      <Link>ToadicusTools\MathTools.cs</Link>
+    </Compile>
+    <Compile Include="..\ToadicusTools\MuMechTools\MuMech_Tools.cs">
+      <Link>ToadicusTools\MuMech_Tools.cs</Link>
+    </Compile>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ItemGroup>
-    <Folder Include="ToadicusTools\" />
-  </ItemGroup>
   <ItemGroup>
     <Reference Include="Assembly-CSharp">
       <HintPath>..\_KSPAssemblies\Assembly-CSharp.dll</HintPath>
@@ -103,4 +130,7 @@
   <ItemGroup>
     <None Include="GameData\AdaptiveDockingNode\AdaptiveDockingNode.cfg" />
   </ItemGroup>
+  <ItemGroup>
+    <Folder Include="ToadicusTools\" />
+  </ItemGroup>
 </Project>

--- a/ModuleAdaptiveDockingNode.cs
+++ b/ModuleAdaptiveDockingNode.cs
@@ -27,6 +27,7 @@
 using System;
 using System.Collections.Generic;
 using ToadicusTools;
+using ToadicusTools.Extensions;
 using UnityEngine;
 
 namespace AdaptiveDockingNode
@@ -128,7 +129,7 @@
 			{
 				case StartState.Editor:
 				case StartState.None:
-					Tools.PostDebugMessage(this, "Refusing to start when not in flight.");
+					Logging.PostDebugMessage(this, "Refusing to start when not in flight.");
 					return;
 				default:
 					break;
@@ -153,7 +154,7 @@
 
 			if (this.validSizes == null || this.validSizes.Count == 0)
 			{
-				Tools.PostDebugMessage(this,
+				Logging.PostDebugMessage(this,
 					"Refusing to start because our module was configured poorly." +
 					"\n\tvalidSizes: {0}",
 					this.validSizes
@@ -197,12 +198,12 @@
 				}
 			}
 
-			Tools.PostDebugMessage(this, "Loaded!" +
+			Logging.PostDebugMessage(this, "Loaded!" +
 				"\n\tdefaultSize: {0}",
 				this.defaultSize
 			);
 
-			Tools.PostDebugMessage(this, "Port gender is {0}", Enum.GetName(typeof(PortGender), this.portGender));
+			Logging.PostDebugMessage(this, "Port gender is {0}", Enum.GetName(typeof(PortGender), this.portGender));
 
 			this.timeoutTimer = new System.Diagnostics.Stopwatch();
 
@@ -210,7 +211,7 @@
 
 			if (this.dockingModule == null)
 			{
-				Tools.PostDebugMessage(this, "Failed startup because a docking module could not be found.");
+				Logging.PostDebugMessage(this, "Failed startup because a docking module could not be found.");
 				return;
 			}
 
@@ -234,7 +235,7 @@
 
 			if (this.dockingModule.referenceAttachNode != string.Empty)
 			{
-				Tools.PostDebugMessage(this,
+				Logging.PostDebugMessage(this,
 					string.Format("referenceAttachNode string: {0}", this.dockingModule.referenceAttachNode));
 
 				AttachNode node;
@@ -249,7 +250,7 @@
 					}
 				}
 
-				Tools.PostDebugMessage(this,
+				Logging.PostDebugMessage(this,
 					string.Format("referenceAttachNode: {0}", this.referenceAttachNode));
 			}
 
@@ -267,7 +268,7 @@
 
 			this.hasAttachedState = !this.hasAttachedPart;
 
-			Tools.PostDebugMessage(this, "Started!",
+			Logging.PostDebugMessage(this, "Started!",
 				string.Format("dockingModule: {0}", this.dockingModule)
 			);
 		}
@@ -285,7 +286,7 @@
 				bool foundApproach = false;
 				#endif
 
-				Tools.DebugLogger verboseLog = Tools.DebugLogger.New(this);
+				PooledDebugLogger verboseLog = PooledDebugLogger.New(this);
 
 				#if DEBUG
 				try
@@ -591,7 +592,7 @@
 		{
 			if (HighLogic.LoadedSceneIsEditor)
 			{
-				Tools.PostDebugMessage(this, "LateUpdate", string.Format("attachedPart: {0}", this.attachedPart));
+				Logging.PostDebugMessage(this, "LateUpdate", string.Format("attachedPart: {0}", this.attachedPart));
 
 				if (this.hasAttachedPart != this.hasAttachedState)
 				{
@@ -601,7 +602,7 @@
 					{
 						ModuleDockingNode attachedNode = this.attachedPart.getFirstModuleOfType<ModuleDockingNode>();
 
-						Tools.PostDebugMessage(this, string.Format("attachedNode: {0}", attachedNode));
+						Logging.PostDebugMessage(this, string.Format("attachedNode: {0}", attachedNode));
 
 						if (attachedNode != null)
 						{
@@ -612,7 +613,7 @@
 							{
 								this.currentSize = GetGreatestCommonNodeType(this, attachedADN);
 
-								Tools.PostDebugMessage(this,
+								Logging.PostDebugMessage(this,
 									string.Format("Attached to AdaptiveDockingNode, setting currentSize = {0}",
 										this.currentSize)
 								);
@@ -621,7 +622,7 @@
 							{
 								this.currentSize = attachedNode.nodeType;
 
-								Tools.PostDebugMessage(this,
+								Logging.PostDebugMessage(this,
 									string.Format("Attached to ModuleDockingNode, setting currentSize = {0}",
 										this.currentSize)
 								);