VOID_Core: Added a module.LoadConfig call to LoadModule.
VOID_Core: Added a module.LoadConfig call to LoadModule.

--- a/IVOID_Module.cs
+++ b/IVOID_Module.cs
@@ -24,8 +24,9 @@
 {
 	public interface IVOID_Module
 	{
+		string Name { get; }
 		bool hasConfigurables { get; }
-		bool toggleActive { get; }
+		bool toggleActive { get; set; }
 		bool guiRunning { get; }
 
 		void DrawGUI();

--- a/VOID_Core.cs
+++ b/VOID_Core.cs
@@ -64,7 +64,7 @@
 		[AVOID_SaveValue("configValue")]
 		protected VOID_SaveValue<int> configVersion = 1;
 
-		protected List<VOID_Module> _modules = new List<VOID_Module>();
+		protected List<IVOID_Module> _modules = new List<IVOID_Module>();
 		protected bool _modulesLoaded = false;
 
 		protected List<Callback> _configurableCallbacks = new List<Callback>();
@@ -115,7 +115,7 @@
 		/*
 		 * Properties
 		 * */
-		public List<VOID_Module> Modules
+		public List<IVOID_Module> Modules
 		{
 			get
 			{
@@ -152,8 +152,6 @@
 
 			this.VOIDIconOn = GameDatabase.Instance.GetTexture (this.VOIDIconOnPath, false);
 			this.VOIDIconOff = GameDatabase.Instance.GetTexture (this.VOIDIconOffPath, false);
-
-			Tools.PostDebugMessage (string.Format ("VOID_Core: Loaded {0} modules.", this.Modules.Count));
 
 			this.LoadConfig ();
 		}
@@ -169,7 +167,7 @@
 					        );
 
 			Tools.PostDebugMessage (string.Format (
-				"{0}: Checking {1} modules to check.",
+				"{0}: Found {1} modules to check.",
 				this.GetType ().Name,
 				types.Count ()
 				));
@@ -185,6 +183,8 @@
 			}
 
 			this._modulesLoaded = true;
+
+			Tools.PostDebugMessage (string.Format ("VOID_Core: Loaded {0} modules.", this.Modules.Count));
 		}
 
 		protected void LoadModule(Type T)
@@ -199,8 +199,15 @@
 				));
 				return;
 			}
-			VOID_Module module = Activator.CreateInstance (T) as VOID_Module;
+			IVOID_Module module = Activator.CreateInstance (T) as IVOID_Module;
+			module.LoadConfig();
 			this._modules.Add (module);
+
+			Tools.PostDebugMessage(string.Format(
+				"{0}: loaded module {1}.",
+				this.GetType().Name,
+				T.Name
+			));
 		}
 
 		public void Update()
@@ -217,7 +224,7 @@
 				this.StopGUI ();
 			}
 
-			foreach (VOID_Module module in this.Modules)
+			foreach (IVOID_Module module in this.Modules)
 			{
 				if (!module.guiRunning && module.toggleActive)
 				{
@@ -267,7 +274,7 @@
 				if (GUILayout.Button("Power " + str)) togglePower = !togglePower;
 			    if (togglePower)
 			    {
-					foreach (VOID_Module module in this.Modules)
+					foreach (IVOID_Module module in this.Modules)
 					{
 						module.toggleActive = GUILayout.Toggle (module.toggleActive, module.Name);
 					}
@@ -301,7 +308,7 @@
 		{
 			this.consumeResource = GUILayout.Toggle (this.consumeResource, "Consume Resources");
 
-			foreach (VOID_Module mod in this.Modules)
+			foreach (IVOID_Module mod in this.Modules)
 			{
 				mod.DrawConfigurables ();
 			}
@@ -368,7 +375,7 @@
 		{
 			base.LoadConfig ();
 
-			foreach (VOID_Module module in this.Modules)
+			foreach (IVOID_Module module in this.Modules)
 			{
 				module.LoadConfig ();
 			}
@@ -383,7 +390,7 @@
 
 			base.SaveConfig ();
 
-			foreach (VOID_Module module in this.Modules)
+			foreach (IVOID_Module module in this.Modules)
 			{
 				module.SaveConfig ();
 			}