Version 0.9.22 0.9.22
Version 0.9.22

--- a/VOID_Core.cs
+++ b/VOID_Core.cs
@@ -69,7 +69,7 @@
 		 * Fields
 		 * */
 		protected string VoidName = "VOID";
-		protected string VoidVersion = "0.9.20";
+		protected string VoidVersion = "0.9.22";
 
 		protected bool _factoryReset = false;
 
@@ -134,10 +134,13 @@
 		public float saveTimer = 0;
 
 		protected string defaultSkin = "KSP window 2";
+
 		[AVOID_SaveValue("defaultSkin")]
 		protected VOID_SaveValue<string> _skinName;
-		protected Dictionary<string, GUISkin> skin_list;
-		protected List<string> skinNames;
+		protected int _skinIdx;
+
+		protected Dictionary<string, GUISkin> validSkins;
+		protected string[] skinNames;
 		protected string[] forbiddenSkins =
 			{
 				"PlaqueDialogSkin",
@@ -180,11 +183,18 @@
 		{
 			get
 			{
-				if (!this.skinsLoaded || this._skinName == null)
-				{
-					return AssetBase.GetGUISkin(this.defaultSkin);
-				}
-				return this.skin_list[this._skinName];
+				if (this.skinsLoaded)
+				{
+					try
+					{
+						return this.validSkins[this._skinName];
+					}
+					catch
+					{
+					}
+				}
+
+				return AssetBase.GetGUISkin(this.defaultSkin);
 			}
 		}
 
@@ -306,12 +316,10 @@
 					this.ToolbarButton.Destroy();
 					this.ToolbarButton = null;
 				}
-				if (value == true && this.ToolbarButton == null)
+				if (value == true)
 				{
 					this.InitializeToolbarButton();
 				}
-
-				this.SetIconTexture(this.powerState | this.activeState);
 
 				_UseToolbarManager.value = value;
 			}
@@ -594,8 +602,6 @@
 
 		public override void DrawConfigurables()
 		{
-			int skinIdx;
-
 			GUIContent _content;
 
 			if (HighLogic.LoadedSceneIsFlight)
@@ -612,33 +618,18 @@
 			GUILayout.Label("Skin:", GUILayout.ExpandWidth(false));
 
 			_content = new GUIContent();
-
-			if (skinNames.Contains(this._skinName))
-			{
-				skinIdx = skinNames.IndexOf(this._skinName);
-			}
-			else if (skinNames.Contains(this.defaultSkin))
-			{
-				skinIdx = skinNames.IndexOf(this.defaultSkin);
-			}
-			else
-			{
-				skinIdx = 0;
-			}
 
 			_content.text = "◄";
 			_content.tooltip = "Select previous skin";
 			if (GUILayout.Button(_content, GUILayout.ExpandWidth(true)))
 			{
 				this.GUIStylesLoaded = false;
-				skinIdx--;
-				if (skinIdx < 0)
-					skinIdx = skinNames.Count - 1;
+				this._skinIdx--;
 				Tools.PostDebugMessage(string.Format(
 					"{0}: new this._skinIdx = {1} :: skin_list.Count = {2}",
 					this.GetType().Name,
 					this._skinName,
-					this.skin_list.Count
+					this.validSkins.Count
 				));
 			}
 
@@ -651,20 +642,24 @@
 			if (GUILayout.Button(_content, GUILayout.ExpandWidth(true)))
 			{
 				this.GUIStylesLoaded = false;
-				skinIdx++;
-				if (skinIdx >= skinNames.Count)
-					skinIdx = 0;
+				this._skinIdx++;
 				Tools.PostDebugMessage(string.Format(
 					"{0}: new this._skinIdx = {1} :: skin_list.Count = {2}",
 					this.GetType().Name,
 					this._skinName,
-					this.skin_list.Count
+					this.validSkins.Count
 				));
 			}
 
-			if (this._skinName != skinNames[skinIdx])
-			{
-				this._skinName = skinNames[skinIdx];
+			this._skinIdx %= this.skinNames.Length;
+			if (this._skinIdx < 0)
+			{
+				this._skinIdx += this.skinNames.Length;
+			}
+
+			if (this._skinName != skinNames[this._skinIdx])
+			{
+				this._skinName.value = skinNames[this._skinIdx];
 			}
 
 			GUILayout.EndHorizontal();
@@ -767,7 +762,7 @@
 				)
 			);
 
-			this.skin_list = Resources.FindObjectsOfTypeAll(typeof(GUISkin))
+			this.validSkins = Resources.FindObjectsOfTypeAll(typeof(GUISkin))
 				.Where(s => !this.forbiddenSkins.Contains(s.name))
 				.Select(s => s as GUISkin)
 				.GroupBy(s => s.name)
@@ -777,19 +772,33 @@
 			Tools.PostDebugMessage(string.Format(
 				"{0}: loaded {1} GUISkins.",
 				this.GetType().Name,
-				this.skin_list.Count
+				this.validSkins.Count
 			));
 
-			this.skinNames = this.skin_list.Keys.ToList();
-			this.skinNames.Sort();
-
-			if (this._skinName == null || !this.skinNames.Contains(this._skinName))
-			{
-				this._skinName = this.defaultSkin;
-				Tools.PostDebugMessage(string.Format(
-					"{0}: resetting _skinIdx to default.",
-					this.GetType().Name
-				));
+			this.skinNames = this.validSkins.Keys.ToArray();
+			Array.Sort(this.skinNames);
+
+			int defaultIdx = int.MinValue;
+
+			for (int i = 0; i < this.skinNames.Length; i++)
+			{
+				if (this.skinNames[i] == this._skinName)
+				{
+					this._skinIdx = i;
+				}
+				if (this.skinNames[i] == this.defaultSkin)
+				{
+					defaultIdx = i;
+				}
+				if (this._skinIdx != int.MinValue && defaultIdx != int.MinValue)
+				{
+					break;
+				}
+			}
+
+			if (this._skinIdx == int.MinValue)
+			{
+				this._skinIdx = defaultIdx;
 			}
 
 			Tools.PostDebugMessage(string.Format(
@@ -860,6 +869,8 @@
 			{
 				this.ToggleMainWindow();
 			};
+
+			Tools.PostDebugMessage(string.Format("{0}: Toolbar Button initialized.", this.GetType().Name));
 		}
 
 		protected void ToggleMainWindow()
@@ -891,14 +902,12 @@
 
 		protected void SetIconTexture(string texturePath)
 		{
-			if (this.UseToolbarManager && this.ToolbarButton != null)
+			if (this.ToolbarButton != null)
 			{
 				this.ToolbarButton.TexturePath = texturePath;
 			}
-			else
-			{
-				this.VOIDIconTexture = GameDatabase.Instance.GetTexture(texturePath, false);
-			}
+
+			this.VOIDIconTexture = GameDatabase.Instance.GetTexture(texturePath, false);
 		}
 
 		protected void CheckAndSave()
@@ -957,6 +966,7 @@
 			this._Active.value = true;
 
 			this._skinName = this.defaultSkin;
+			this._skinIdx = int.MinValue;
 
 			this.VOIDIconOnInactivePath = "VOID/Textures/void_icon_light_glow";
 			this.VOIDIconOnActivePath = "VOID/Textures/void_icon_dark_glow";

--- a/VOID_HUD.cs
+++ b/VOID_HUD.cs
@@ -20,6 +20,7 @@
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 //
 
+using Engineer.VesselSimulator;
 using KSP;
 using UnityEngine;
 using System;
@@ -208,7 +209,12 @@
 
 			VOID_Core.Instance.LabelStyles["hud"].normal.textColor = textColors [ColorIndex];
 
-			this.leftHUDPos = GUI.Window(
+			if ((TimeWarp.WarpMode == TimeWarp.Modes.LOW) || (TimeWarp.CurrentRate <= TimeWarp.MaxPhysicsRate))
+			{
+				SimManager.Instance.RequestSimulation();
+			}
+
+			this.leftHUDPos.value = GUI.Window(
 				VOID_Core.Instance.windowID,
 				this.leftHUDPos,
 				this.leftHUDWindow,
@@ -216,7 +222,7 @@
 				GUIStyle.none
 			);
 
-			this.rightHUDPos = GUI.Window(
+			this.rightHUDPos.value = GUI.Window(
 				VOID_Core.Instance.windowID,
 				this.rightHUDPos,
 				this.rightHUDWindow,
@@ -246,18 +252,18 @@
 
 	public static partial class VOID_Data
 	{
-		public static VOID_StrValue expSituation = new VOID_StrValue(
+		public static readonly VOID_StrValue expSituation = new VOID_StrValue(
 			"Situation",
 			new Func<string> (() => VOID_Core.Instance.vessel.GetExperimentSituation().HumanString())
 		);
 
-		public static VOID_DoubleValue vesselPitch = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue vesselPitch = new VOID_DoubleValue(
 			"Pitch",
 			() => core.vessel.getSurfacePitch(),
 			"°"
 		);
 
-		public static VOID_DoubleValue stageMassFlow = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue stageMassFlow = new VOID_DoubleValue(
 			"Stage Mass Flow",
 			delegate()
 			{
@@ -274,7 +280,7 @@
 			"Mg/s"
 		);
 
-		public static VOID_DoubleValue burnTimeCompleteAtNode = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue burnTimeCompleteAtNode = new VOID_DoubleValue(
 			"Full burn time to complete at node",
 			delegate()
 			{
@@ -291,7 +297,7 @@
 			"s"
 		);
 
-		public static VOID_DoubleValue burnTimeHalfDoneAtNode = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue burnTimeHalfDoneAtNode = new VOID_DoubleValue(
 			"Full burn time to be half done at node",
 			delegate()
 			{

--- a/VOID_Orbital.cs
+++ b/VOID_Orbital.cs
@@ -118,52 +118,52 @@
 
 	public static partial class VOID_Data
 	{
-		public static VOID_StrValue primaryName = new VOID_StrValue (
+		public static readonly VOID_StrValue primaryName = new VOID_StrValue (
 			VOIDLabels.void_primary,
 			new Func<string> (() => VOID_Core.Instance.vessel.mainBody.name)
 		);
 
-		public static VOID_DoubleValue orbitAltitude = new VOID_DoubleValue (
+		public static readonly VOID_DoubleValue orbitAltitude = new VOID_DoubleValue (
 			"Altitude (ASL)",
 			new Func<double> (() => VOID_Core.Instance.vessel.orbit.altitude),
 			"m"
 		);
 
-		public static VOID_DoubleValue orbitVelocity = new VOID_DoubleValue (
+		public static readonly VOID_DoubleValue orbitVelocity = new VOID_DoubleValue (
 			VOIDLabels.void_velocity,
 			new Func<double> (() => VOID_Core.Instance.vessel.orbit.vel.magnitude),
 			"m/s"
 		);
 
-		public static VOID_DoubleValue orbitApoAlt = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue orbitApoAlt = new VOID_DoubleValue(
 			VOIDLabels.void_apoapsis,
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.ApA),
 			"m"
 		);
 
-		public static VOID_DoubleValue oribtPeriAlt = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue oribtPeriAlt = new VOID_DoubleValue(
 			VOIDLabels.void_periapsis,
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.PeA),
 			"m"
 		);
 
-		public static VOID_StrValue timeToApo = new VOID_StrValue(
+		public static readonly VOID_StrValue timeToApo = new VOID_StrValue(
 			"Time to Apoapsis",
 			new Func<string>(() => Tools.ConvertInterval(VOID_Core.Instance.vessel.orbit.timeToAp))
 		);
 
-		public static VOID_StrValue timeToPeri = new VOID_StrValue(
+		public static readonly VOID_StrValue timeToPeri = new VOID_StrValue(
 			"Time to Periapsis",
 			new Func<string>(() => Tools.ConvertInterval(VOID_Core.Instance.vessel.orbit.timeToPe))
 		);
 
-		public static VOID_DoubleValue orbitInclination = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue orbitInclination = new VOID_DoubleValue(
 			"Inclination",
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.inclination),
 			"°"
 		);
 
-		public static VOID_DoubleValue gravityAccel = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue gravityAccel = new VOID_DoubleValue(
 			"Gravity",
 			delegate()
 		{
@@ -175,54 +175,54 @@
 			"m/s²"
 		);
 
-		public static VOID_StrValue orbitPeriod = new VOID_StrValue(
+		public static readonly VOID_StrValue orbitPeriod = new VOID_StrValue(
 			"Period",
 			new Func<string>(() => Tools.ConvertInterval(VOID_Core.Instance.vessel.orbit.period))
 		);
 
-		public static VOID_DoubleValue semiMajorAxis = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue semiMajorAxis = new VOID_DoubleValue(
 			"Semi-Major Axis",
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.semiMajorAxis),
 			"m"
 		);
 
-		public static VOID_DoubleValue eccentricity = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue eccentricity = new VOID_DoubleValue(
 			"Eccentricity",
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.eccentricity),
 			""
 		);
 
-		public static VOID_DoubleValue meanAnomaly = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue meanAnomaly = new VOID_DoubleValue(
 			"Mean Anomaly",
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.meanAnomaly * 180d / Math.PI),
 			"°"
 		);
 
-		public static VOID_DoubleValue trueAnomaly = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue trueAnomaly = new VOID_DoubleValue(
 			"True Anomaly",
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.trueAnomaly),
 			"°"
 		);
 
-		public static VOID_DoubleValue eccAnomaly = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue eccAnomaly = new VOID_DoubleValue(
 			"Eccentric Anomaly",
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.eccentricAnomaly * 180d / Math.PI),
 			"°"
 		);
 
-		public static VOID_DoubleValue longitudeAscNode = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue longitudeAscNode = new VOID_DoubleValue(
 			"Long. Ascending Node",
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.LAN),
 			"°"
 		);
 
-		public static VOID_DoubleValue argumentPeriapsis = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue argumentPeriapsis = new VOID_DoubleValue(
 			"Argument of Periapsis",
 			new Func<double>(() => VOID_Core.Instance.vessel.orbit.argumentOfPeriapsis),
 			"°"
 		);
 
-		public static VOID_DoubleValue localSiderealLongitude = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue localSiderealLongitude = new VOID_DoubleValue(
 			"Local Sidereal Longitude",
 			new Func<double>(() => Tools.FixDegreeDomain(
 				VOID_Core.Instance.vessel.longitude + VOID_Core.Instance.vessel.orbit.referenceBody.rotationAngle)),

--- a/VOID_SurfAtmo.cs
+++ b/VOID_SurfAtmo.cs
@@ -100,7 +100,7 @@
 
 	public static partial class VOID_Data
 	{
-		public static VOID_DoubleValue trueAltitude = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue trueAltitude = new VOID_DoubleValue(
 			"Altitude (true)",
 			delegate()
 			{
@@ -114,17 +114,17 @@
 			"m"
 		);
 
-		public static VOID_StrValue surfLatitude = new VOID_StrValue(
+		public static readonly VOID_StrValue surfLatitude = new VOID_StrValue(
 			"Latitude",
 			new Func<string> (() => Tools.GetLatitudeString(VOID_Core.Instance.vessel))
 		);
 
-		public static VOID_StrValue surfLongitude = new VOID_StrValue(
+		public static readonly VOID_StrValue surfLongitude = new VOID_StrValue(
 			"Longitude",
 			new Func<string> (() => Tools.GetLongitudeString(VOID_Core.Instance.vessel))
 		);
 
-		public static VOID_StrValue vesselHeading = new VOID_StrValue(
+		public static readonly VOID_StrValue vesselHeading = new VOID_StrValue(
 			"Heading",
 			delegate()
 		{
@@ -139,55 +139,55 @@
 		}
 		);
 
-		public static VOID_DoubleValue terrainElevation = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue terrainElevation = new VOID_DoubleValue(
 			"Terrain elevation",
 			new Func<double> (() => VOID_Core.Instance.vessel.terrainAltitude),
 			"m"
 		);
 
-		public static VOID_DoubleValue surfVelocity = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue surfVelocity = new VOID_DoubleValue(
 			"Surface velocity",
 			new Func<double> (() => VOID_Core.Instance.vessel.srf_velocity.magnitude),
 			"m/s"
 		);
 
-		public static VOID_DoubleValue vertVelocity = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue vertVelocity = new VOID_DoubleValue(
 			"Vertical speed",
 			new Func<double> (() => VOID_Core.Instance.vessel.verticalSpeed),
 			"m/s"
 		);
 
-		public static VOID_DoubleValue horzVelocity = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue horzVelocity = new VOID_DoubleValue(
 			"Horizontal speed",
 			new Func<double> (() => VOID_Core.Instance.vessel.horizontalSrfSpeed),
 			"m/s"
 		);
 
-		public static VOID_FloatValue temperature = new VOID_FloatValue(
+		public static readonly VOID_FloatValue temperature = new VOID_FloatValue(
 			"Temperature",
 			new Func<float> (() => VOID_Core.Instance.vessel.flightIntegrator.getExternalTemperature()),
 			"°C"
 		);
 
-		public static VOID_DoubleValue atmDensity = new VOID_DoubleValue (
+		public static readonly VOID_DoubleValue atmDensity = new VOID_DoubleValue (
 			"Atmosphere Density",
 			new Func<double> (() => VOID_Core.Instance.vessel.atmDensity * 1000f),
 			"g/m³"
 		);
 
-		public static VOID_DoubleValue atmPressure = new VOID_DoubleValue (
+		public static readonly VOID_DoubleValue atmPressure = new VOID_DoubleValue (
 			"Pressure",
 			new Func<double> (() => VOID_Core.Instance.vessel.staticPressure),
 			"atm"
 		);
 
-		public static VOID_FloatValue atmLimit = new VOID_FloatValue(
+		public static readonly VOID_FloatValue atmLimit = new VOID_FloatValue(
 			"Atmosphere Limit",
 			new Func<float> (() => VOID_Core.Instance.vessel.mainBody.maxAtmosphereAltitude),
 			"m"
 		);
 
-		public static VOID_StrValue currBiome = new VOID_StrValue(
+		public static readonly VOID_StrValue currBiome = new VOID_StrValue(
 			"Biome",
 			new Func<string> (() => Tools.Toadicus_GetAtt(VOID_Core.Instance.vessel).name)
 		);

--- a/VOID_VesselInfo.cs
+++ b/VOID_VesselInfo.cs
@@ -109,25 +109,25 @@
 
 	public static partial class VOID_Data
 	{
-		public static VOID_DoubleValue geeForce = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue geeForce = new VOID_DoubleValue(
 			"G-force",
 			new Func<double>(() => VOID_Core.Instance.vessel.geeForce),
 			"gees"
 		);
 
-		public static VOID_IntValue partCount = new VOID_IntValue(
+		public static readonly VOID_IntValue partCount = new VOID_IntValue(
 			"Parts",
 			new Func<int>(() => VOID_Core.Instance.vessel.Parts.Count),
 			""
 		);
 
-		public static VOID_DoubleValue totalMass = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue totalMass = new VOID_DoubleValue(
 			"Total Mass",
 			new Func<double> (() => SimManager.Instance.TryGetLastMass()),
 			"tons"
 		);
 
-		public static VOID_DoubleValue resourceMass = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue resourceMass = new VOID_DoubleValue(
 			"Resource Mass",
 			delegate()
 			{
@@ -141,7 +141,7 @@
 			"tons"
 		);
 
-		public static VOID_DoubleValue stageDeltaV = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue stageDeltaV = new VOID_DoubleValue(
 			"DeltaV (Current Stage)",
 			delegate()
 			{
@@ -154,7 +154,7 @@
 			"m/s"
 		);
 
-		public static VOID_DoubleValue totalDeltaV = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue totalDeltaV = new VOID_DoubleValue(
 			"DeltaV (Total)",
 			delegate()
 			{
@@ -165,13 +165,13 @@
 			"m/s"
 		);
 
-		public static VOID_FloatValue mainThrottle = new VOID_FloatValue(
+		public static readonly VOID_FloatValue mainThrottle = new VOID_FloatValue(
 			"Throttle",
 			new Func<float>(() => VOID_Core.Instance.vessel.ctrlState.mainThrottle * 100f),
 			"%"
 		);
 
-		public static VOID_StrValue currmaxThrust = new VOID_StrValue(
+		public static readonly VOID_StrValue currmaxThrust = new VOID_StrValue(
 			"Thrust (curr/max)",
 			delegate()
 			{
@@ -189,7 +189,7 @@
 			}
 		);
 
-		public static VOID_StrValue currmaxThrustWeight = new VOID_StrValue(
+		public static readonly VOID_StrValue currmaxThrustWeight = new VOID_StrValue(
 			"T:W (curr/max)",
 			delegate()
 			{
@@ -214,7 +214,7 @@
 			}
 		);
 
-		public static VOID_DoubleValue surfaceThrustWeight = new VOID_DoubleValue(
+		public static readonly VOID_DoubleValue surfaceThrustWeight = new VOID_DoubleValue(
 			"Max T:W @ surface",
 			delegate()
 			{
@@ -232,7 +232,7 @@
 			""
 		);
 
-		public static VOID_StrValue intakeAirStatus = new VOID_StrValue(
+		public static readonly VOID_StrValue intakeAirStatus = new VOID_StrValue(
 			"Intake Air (Curr / Req)",
 			delegate()
 			{