ARFlightController: Fixed self destruct methods.
ARFlightController: Fixed self destruct methods.

--- a/ARFlightController.cs
+++ b/ARFlightController.cs
@@ -130,6 +130,8 @@
 
 		protected void FixedUpdate()
 		{
+			Tools.DebugLogger log = Tools.DebugLogger.New(this);
+
 			// If we are requiring a connection for control, the vessel does not have any adequately staffed pods,
 			// and the vessel does not have any connected relays...
 			if (
@@ -156,20 +158,39 @@
 
 			if (this.toolbarButton != null && HighLogic.LoadedSceneIsFlight && FlightGlobals.ActiveVessel != null)
 			{
+				log.Append("Checking vessel relay status.\n");
+
 				List<ModuleLimitedDataTransmitter> relays =
 					FlightGlobals.ActiveVessel.getModulesOfType<ModuleLimitedDataTransmitter>();
 
+				log.AppendFormat("\t...found {0} relays\n", relays.Count);
+
 				bool vesselCanTransmit = false;
 				bool vesselHasOptimalRelay = false;
 
 				foreach (ModuleLimitedDataTransmitter relay in relays)
 				{
-					if (!vesselCanTransmit && relay.CanTransmit())
+					log.AppendFormat("\tvesselCanTransmit: {0}, vesselHasOptimalRelay: {1}\n",
+						vesselCanTransmit, vesselHasOptimalRelay);
+
+					log.AppendFormat("\tChecking relay {0}\n" +
+						"\t\tCanTransmit: {1}, transmitDistance: {2}, nominalRange: {3}\n",
+						relay,
+						relay.CanTransmit(),
+						relay.transmitDistance,
+						relay.nominalRange
+					);
+
+					bool relayCanTransmit = relay.CanTransmit();
+
+					if (!vesselCanTransmit && relayCanTransmit)
 					{
 						vesselCanTransmit = true;
 					}
 
-					if (!vesselHasOptimalRelay && relay.transmitDistance <= (double)relay.nominalRange)
+					if (!vesselHasOptimalRelay &&
+						relayCanTransmit &&
+						relay.transmitDistance <= (double)relay.nominalRange)
 					{
 						vesselHasOptimalRelay = true;
 					}
@@ -180,6 +201,9 @@
 					}
 				}
 
+				log.AppendFormat("Done checking.  vesselCanTransmit: {0}, vesselHasOptimalRelay: {1}\n",
+					vesselCanTransmit, vesselHasOptimalRelay);
+
 				if (vesselHasOptimalRelay)
 				{
 					this.currentConnectionStatus = ConnectionStatus.Optimal;
@@ -193,11 +217,16 @@
 					this.currentConnectionStatus = ConnectionStatus.None;
 				}
 
+				log.AppendFormat("currentConnectionStatus: {0}, setting texture to {1}",
+					this.currentConnectionStatus, this.currentConnectionTexture);
+
 				this.toolbarButton.TexturePath = this.currentConnectionTexture;
 			}
-		}
-
-		protected void Destroy()
+
+			log.Print();
+		}
+
+		protected void OnDestroy()
 		{
 			InputLockManager.RemoveControlLock(this.lockID);
 
@@ -208,6 +237,8 @@
 
 			GameEvents.onGameSceneLoadRequested.Remove(this.onSceneChangeRequested);
 			GameEvents.onVesselChange.Remove(this.onVesselChange);
+
+			print("ARFlightController: Destroyed.");
 		}
 		#endregion
 
@@ -216,6 +247,7 @@
 		{
 			if (scene != GameScenes.FLIGHT)
 			{
+				print("ARFlightController: Requesting Destruction.");
 				MonoBehaviour.Destroy(this);
 			}
 		}