More of The Big Refactor.
[VOID.git] / API / VOIDCore.cs
blob:a/API/VOIDCore.cs -> blob:b/API/VOIDCore.cs
--- a/API/VOIDCore.cs
+++ b/API/VOIDCore.cs
@@ -30,50 +30,60 @@
 using KSP;
 using System;
 using System.Collections.Generic;
-using ToadicusTools;
 using UnityEngine;
 
 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 abstract int windowID { get; }
+		public abstract int ConfigVersion { get; }
+		public virtual bool configNeedsUpdate { get; set; }
+
+		public abstract string SceneKey { 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; }
 
-		public virtual event VOIDEventHandler onApplicationQuit;
+		public abstract VOID_TimeScale TimeScale { get; protected set; }
+
+		public abstract event VOIDEventHandler onApplicationQuit;
+		public abstract event VOIDEventHandler onSkinChanged;
+		public abstract event VOIDEventHandler onUpdate;
 
 		public virtual void OnGUI() {}
 
-		public virtual void OnApplicationQuit()
+		public override void LoadConfig()
 		{
-			if (this.onApplicationQuit != null)
-			{
-				this.onApplicationQuit(this);
-			}
+			base.LoadConfig();
 		}
 
 		public abstract void SaveConfig();
+
+		public override void Save(KSP.IO.PluginConfiguration config, string sceneKey)
+		{
+			base.Save(config, sceneKey);
+		}
 	}
 
 	public delegate void VOIDEventHandler(object sender);