Changes to Module, Core, and throughout to support module filtering by game mode. Also tweaks to CareerStatus.formatDelta.
[VOID.git] / API / VOIDCore.cs
blob:a/API/VOIDCore.cs -> blob:b/API/VOIDCore.cs
--- a/API/VOIDCore.cs
+++ b/API/VOIDCore.cs
@@ -35,35 +35,32 @@
 
 namespace VOID
 {
-	public abstract class VOIDCore : VOID_Module, IVOID_Module
+	public abstract class VOIDCore : VOID_WindowModule, IVOID_Module
 	{
 		public const double Constant_G = 6.674e-11;
 		public const int CONFIG_VERSION = 2;
 
-		public static bool useToolbarManager;
-
-		public abstract int configVersion { get; }
+		public abstract int ConfigVersion { get; }
 		public virtual bool configNeedsUpdate { get; set; }
 
-		public abstract int windowID { get; }
+		public abstract int WindowID { get; }
 		public abstract bool configDirty { get; set; }
 		public abstract bool powerAvailable	{ get; protected set; }
 
-		public abstract List<IVOID_Module> Modules { get; }
+		public abstract IList<IVOID_Module> Modules { get; }
 
-		public abstract float updateTimer { get; protected set; }
-		public abstract double updatePeriod { get; }
+		public abstract float UpdateTimer { get; protected set; }
+		public abstract double UpdatePeriod { get; }
 
 		public virtual float saveTimer { get; protected set; }
 
 		public abstract GUISkin Skin { get; }
 
 		public abstract CelestialBody HomeBody { get; }
-		public abstract List<CelestialBody> allBodies { get; }
-		public abstract List<CelestialBody> sortedBodyList { get; protected set; }
+		public abstract IList<CelestialBody> AllBodies { get; }
+		public abstract List<CelestialBody> SortedBodyList { get; protected set; }
 
-		public abstract List<VesselType> allVesselTypes { get; }
-
+		public abstract VesselType[] AllVesselTypes { get; protected set; }
 		public abstract Stage LastStage { get; protected set; }
 		public abstract Stage[] Stages { get; protected set; }
 
@@ -74,20 +71,14 @@
 
 		public override void LoadConfig()
 		{
-			var config = KSP.IO.PluginConfiguration.CreateForType<VOIDCore>(null);
-
-			useToolbarManager = config.GetValue("UseToolbarManager", useToolbarManager);
-
 			base.LoadConfig();
 		}
 
 		public abstract void SaveConfig();
 
-		public override void _SaveToConfig(KSP.IO.PluginConfiguration config)
+		public override void Save(KSP.IO.PluginConfiguration config)
 		{
-			config.SetValue("UseToolbarManager", useToolbarManager);
-
-			base._SaveToConfig(config);
+			base.Save(config);
 		}
 	}