VOID_Core: Removed some old, unused code.
VOID_Core: Removed some old, unused code.

--- a/VOID_CareerStatus.cs
+++ b/VOID_CareerStatus.cs
@@ -166,19 +166,20 @@
 			GUI.DragWindow();
 		}
 
-		private void onFundsChange(double newValue)
+		// TODO: Update event handlers to do something useful with the new "reasons" parameter.
+		private void onFundsChange(double newValue, TransactionReasons reasons)
 		{
 			this.lastFundsChange = newValue - this.currentFunds;
 			this.currentFunds = newValue;
 		}
 
-		private void onRepChange(float newValue)
+		private void onRepChange(float newValue, TransactionReasons reasons)
 		{
 			this.lastRepChange = newValue - this.currentReputation;
 			this.currentReputation = newValue;
 		}
 
-		private void onScienceChange(float newValue)
+		private void onScienceChange(float newValue, TransactionReasons reasons)
 		{
 			this.lastScienceChange = newValue - this.currentScience;
 			this.currentScience = newValue;

--- a/VOID_Core.cs
+++ b/VOID_Core.cs
@@ -31,6 +31,7 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Text;
 using ToadicusTools;
 using UnityEngine;
 
@@ -717,7 +718,7 @@
 				this.stringFrequency = (1f / this.updatePeriod).ToString();
 			}
 			this.stringFrequency = GUILayout.TextField(this.stringFrequency.ToString(), 5, GUILayout.ExpandWidth(true));
-			// GUILayout.FlexibleSpace();
+
 			if (GUILayout.Button("Apply"))
 			{
 				double updateFreq = 1f / this.updatePeriod;
@@ -771,43 +772,52 @@
 
 		protected void LoadModulesOfType<T>()
 		{
-			var types = AssemblyLoader.loadedAssemblies
-				.Select(a => a.assembly.GetExportedTypes())
-				.SelectMany(t => t)
-				.Where(v => typeof(T).IsAssignableFrom(v)
-					&& !(v.IsInterface || v.IsAbstract) &&
-					!typeof(VOID_Core).IsAssignableFrom(v)
-				);
-
-			Tools.PostDebugMessage(string.Format(
-				"{0}: Found {1} modules to check.",
-				this.GetType().Name,
-				types.Count()
-			));
-			foreach (var voidType in types)
-			{
-				if (!HighLogic.LoadedSceneIsEditor &&
-					typeof(IVOID_EditorModule).IsAssignableFrom(voidType))
-				{
-					continue;
-				}
-
-				Tools.PostDebugMessage(string.Format(
-					"{0}: found Type {1}",
-					this.GetType().Name,
-					voidType.Name
-				));
-
-				this.LoadModule(voidType);
+			StringBuilder sb = new StringBuilder("Loading modules...");
+			sb.AppendLine();
+
+			foreach (AssemblyLoader.LoadedAssembly assy in AssemblyLoader.loadedAssemblies)
+			{
+				foreach (Type loadedType in assy.assembly.GetExportedTypes())
+				{
+					if (
+						loadedType.IsInterface ||
+						loadedType.IsAbstract ||
+						!typeof(T).IsAssignableFrom(loadedType) ||
+						this.GetType().IsAssignableFrom(loadedType)
+					)
+					{
+						continue;
+					}
+
+					// HACK: This stops editor modules from loading in flight.  It is a dirty hack and should be fixed.
+					if (!HighLogic.LoadedSceneIsEditor && typeof(IVOID_EditorModule).IsAssignableFrom(loadedType))
+					{
+						continue;
+					}
+
+					sb.AppendFormat("Loading IVOID_Module type {0}...", loadedType.Name);
+
+					try
+					{
+						this.LoadModule(loadedType);
+						sb.AppendLine("Success.");
+					}
+					catch (Exception ex)
+					{
+						sb.AppendFormat("Failed, caught {0}", ex.GetType().Name);
+						sb.AppendLine();
+
+						#if DEBUG
+						Debug.LogException(ex);
+						#endif
+					}
+				}
 			}
 
 			this._modulesLoaded = true;
 
-			Tools.PostDebugMessage(string.Format(
-				"{0}: Loaded {1} modules.",
-				this.GetType().Name,
-				this.Modules.Count
-			));
+			sb.AppendFormat("Loaded {0} modules.", this.Modules.Count);
+			sb.AppendLine();
 		}
 
 		protected void LoadModule(Type T)
@@ -915,10 +925,7 @@
 
 			this.iconStyle = new GUIStyle(GUI.skin.button);
 			this.iconStyle.padding = new RectOffset(0, 0, 0, 0);
-			// this.iconStyle.margin = new RectOffset(0, 0, 0, 0);
-			// this.iconStyle.contentOffset = new Vector2(0, 0);
 			this.iconStyle.overflow = new RectOffset(0, 0, 0, 0);
-			// this.iconStyle.border = new RectOffset(0, 0, 0, 0);
 
 			this.GUIStylesLoaded = true;
 		}