Changes to Module, Core, and throughout to support module filtering by game mode. Also tweaks to CareerStatus.formatDelta.
Changes to Module, Core, and throughout to support module filtering by game mode. Also tweaks to CareerStatus.formatDelta.

--- a/API/Attributes/AVOID_SaveValue.cs
+++ b/API/Attributes/AVOID_SaveValue.cs
@@ -29,22 +29,18 @@
 
 namespace VOID
 {
-	[AttributeUsage(AttributeTargets.Field)]
+	[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
 	public class AVOID_SaveValue : Attribute
 	{
-		protected string _name;
-
 		public string Name
 		{
-			get
-			{
-				return this._name;
-			}
+			get;
+			private set;
 		}
 
 		public AVOID_SaveValue(string fieldName)
 		{
-			this._name = fieldName;
+			this.Name = fieldName;
 		}
 	}
 }

--- /dev/null
+++ b/API/Attributes/VOID_GameModesAttribute.cs
@@ -1,1 +1,48 @@
+// VOID
+//
+// VOID_ScenesAttribute.cs
+//
+// Copyright © 2015, toadicus
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without modification,
+// are permitted provided that the following conditions are met:
+//
+// 1. Redistributions of source code must retain the above copyright notice,
+//    this list of conditions and the following disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above copyright notice,
+//    this list of conditions and the following disclaimer in the documentation and/or other
+//    materials provided with the distribution.
+//
+// 3. Neither the name of the copyright holder nor the names of its contributors may be used
+//    to endorse or promote products derived from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+using System;
 
+namespace VOID
+{
+	[AttributeUsage(AttributeTargets.Class)]
+	public class VOID_ScenesAttribute : Attribute
+	{
+		public GameScenes[] ValidScenes
+		{
+			get;
+			private set;
+		}
+
+		public VOID_ScenesAttribute(params GameScenes[] validScenes)
+		{
+			this.ValidScenes = validScenes;
+		}
+	}
+}
+
+

--- a/API/Attributes/VOID_ScenesAttribute.cs
+++ b/API/Attributes/VOID_ScenesAttribute.cs
@@ -30,17 +30,17 @@
 namespace VOID
 {
 	[AttributeUsage(AttributeTargets.Class)]
-	public class VOID_ScenesAttribute : Attribute
+	public class VOID_GameModesAttribute : Attribute
 	{
-		public GameScenes[] ValidScenes
+		public Game.Modes[] ValidModes
 		{
 			get;
 			private set;
 		}
 
-		public VOID_ScenesAttribute(params GameScenes[] validScenes)
+		public VOID_GameModesAttribute(params Game.Modes[] validModes)
 		{
-			this.ValidScenes = validScenes;
+			this.ValidModes = validModes;
 		}
 	}
 }

--- a/API/IVOID_Module.cs
+++ b/API/IVOID_Module.cs
@@ -36,6 +36,7 @@
 		bool toggleActive { get; set; }
 		bool guiRunning { get; }
 		bool inValidScene { get; }
+		bool inValidGame { get; }
 
 		void DrawGUI();
 		void StartGUI();

--- a/API/VOIDCore.cs
+++ b/API/VOIDCore.cs
@@ -38,6 +38,12 @@
 	public abstract class VOIDCore : VOID_Module, 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 virtual bool configNeedsUpdate { get; set; }
 
 		public abstract int windowID { get; }
 		public abstract bool configDirty { get; set; }
@@ -61,19 +67,28 @@
 		public abstract Stage LastStage { get; protected set; }
 		public abstract Stage[] Stages { get; protected set; }
 
-		public virtual event VOIDEventHandler onApplicationQuit;
+		public abstract event VOIDEventHandler onApplicationQuit;
+		public abstract event VOIDEventHandler onSkinChanged;
 
 		public virtual void OnGUI() {}
 
-		public virtual void OnApplicationQuit()
+		public override void LoadConfig()
 		{
-			if (this.onApplicationQuit != null)
-			{
-				this.onApplicationQuit(this);
-			}
+			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)
+		{
+			config.SetValue("UseToolbarManager", useToolbarManager);
+
+			base._SaveToConfig(config);
+		}
 	}
 
 	public delegate void VOIDEventHandler(object sender);

--- a/API/VOID_Module.cs
+++ b/API/VOID_Module.cs
@@ -43,6 +43,7 @@
 		[AVOID_SaveValue("Active")]
 		protected VOID_SaveValue<bool> _Active = false;
 		private GameScenes[] validScenes;
+		private Game.Modes[] validModes;
 
 		protected float lastUpdate = 0;
 
@@ -57,15 +58,26 @@
 			}
 		}
 
+		protected virtual bool timeToUpdate
+		{
+			get
+			{
+				return (
+					(this.core.updateTimer - this.lastUpdate) > this.core.updatePeriod ||
+					this.lastUpdate > this.core.updateTimer
+				);
+			}
+		}
+
 		public virtual bool toggleActive
 		{
 			get
 			{
-				return this._Active;
+				return this._Active && this.inValidGame && this.inValidScene;
 			}
 			set
 			{
-				this._Active.value = value;
+				this._Active = value && this.inValidGame && this.inValidScene;
 			}
 		}
 
@@ -94,7 +106,7 @@
 			}
 		}
 
-		public virtual bool inValidScene
+		public virtual GameScenes[] ValidScenes
 		{
 			get
 			{
@@ -122,15 +134,81 @@
 					}
 				}
 
+				return this.validScenes;
+			}
+		}
+
+		public virtual bool inValidScene
+		{
+			get
+			{
+
 				Tools.PostDebugMessage(
 					this,
-					"Checking if scene is valid: LoadedScene={0}, validScenes={1}, inValidScene={2}",
+					"Checking if scene is valid: LoadedScene={0}, ValidScenes={1}, inValidScene={2}",
 					Enum.GetName(typeof(GameScenes), HighLogic.LoadedScene),
-					string.Join(", ", this.validScenes.Select(s => Enum.GetName(typeof(GameScenes), s)).ToArray()),
-					this.validScenes.Contains(HighLogic.LoadedScene)
+					string.Join(", ", this.ValidScenes.Select(s => Enum.GetName(typeof(GameScenes), s)).ToArray()),
+					this.ValidScenes.Contains(HighLogic.LoadedScene)
 				);
 
-				return this.validScenes.Contains(HighLogic.LoadedScene);
+				return this.ValidScenes.Contains(HighLogic.LoadedScene);
+			}
+		}
+
+		public virtual Game.Modes[] ValidModes
+		{
+			get
+			{
+				if (this.validModes == null)
+				{
+					Tools.PostDebugMessage(this, "validModes is null when checking inValidGame; fetching attribute.");
+					foreach (var attr in this.GetType().GetCustomAttributes(false))
+					{
+						if (attr is VOID_GameModesAttribute)
+						{
+							VOID_GameModesAttribute addonAttr = (VOID_GameModesAttribute)attr;
+
+							this.validModes = addonAttr.ValidModes;
+
+							Tools.PostDebugMessage("Found VOID_GameModesAttribute; validScenes set.");
+
+							break;
+						}
+					}
+
+					if (this.validModes == null)
+					{
+						this.validModes = new Game.Modes[]
+						{
+							Game.Modes.CAREER,
+							Game.Modes.SANDBOX,
+							Game.Modes.SCENARIO,
+							Game.Modes.SCENARIO_NON_RESUMABLE,
+							Game.Modes.SCIENCE_SANDBOX
+						};
+
+						Tools.PostDebugMessage("No VOID_GameModesAttribute found; validScenes defaulted to flight.");
+					}
+				}
+
+				return this.validModes;
+			}
+		}
+
+		public virtual bool inValidGame
+		{
+			get
+			{
+
+				Tools.PostDebugMessage(
+					this,
+					"Checking if mode is valid: CurrentGame.Mode={0}, ValidModes={1}, inValidGame={2}",
+					Enum.GetName(typeof(Game.Modes), HighLogic.CurrentGame.Mode),
+					string.Join(", ", this.ValidModes.Select(m => Enum.GetName(typeof(Game.Modes), m)).ToArray()),
+					this.ValidModes.Contains(HighLogic.CurrentGame.Mode)
+				);
+
+				return this.ValidModes.Contains(HighLogic.CurrentGame.Mode);
 			}
 		}
 
@@ -181,13 +259,33 @@
 			var config = KSP.IO.PluginConfiguration.CreateForType<VOID_Module> ();
 			config.load ();
 
-			foreach (var field in this.GetType().GetFields(
+			if (this is VOIDCore)
+			{
+				int configVersion = config.GetValue("VOID_Core_configValue", 2);
+
+				if (configVersion < VOIDCore.CONFIG_VERSION)
+				{
+					((VOIDCore)this).configNeedsUpdate = true;
+				}
+			}
+
+			foreach (var field in this.GetType().GetMembers(
 				BindingFlags.NonPublic |
 				BindingFlags.Public |
 				BindingFlags.Instance |
 				BindingFlags.FlattenHierarchy
-				))
-			{
+			))
+			{
+				if (!(field is FieldInfo || field is PropertyInfo))
+				{
+					continue;
+				}
+
+				if (field is PropertyInfo && (field as PropertyInfo).GetIndexParameters().Length > 0)
+				{
+					continue;
+				}
+
 				object[] attrs = field.GetCustomAttributes(typeof(AVOID_SaveValue), false);
 
 				if (attrs.Length == 0) {
@@ -196,11 +294,48 @@
 
 				AVOID_SaveValue attr = attrs.FirstOrDefault () as AVOID_SaveValue;
 
-				string fieldName = string.Format("{0}_{1}", this.GetType().Name, attr.Name);
+				string fieldName = string.Empty;
+
+				if (this is VOIDCore || this.core.configNeedsUpdate)
+				{
+					string typeName = this.GetType().Name;;
+
+					if (this is VOIDCore && ((VOIDCore)this).configNeedsUpdate)
+					{
+						if (this is VOIDCore_Flight)
+						{
+							typeName = "VOID_Core";
+						}
+						else if (this is VOIDCore_Editor)
+						{
+							typeName = "VOID_EditorCore";
+						}
+					}
+
+					fieldName = string.Format("{0}_{1}", typeName, attr.Name);
+				}
+				else
+				{
+					fieldName = string.Format(
+						"{0}_{1}_{2}",
+						this.GetType().Name,
+						Enum.GetName(typeof(GameScenes), HighLogic.LoadedScene),
+						attr.Name
+					);
+				}
 
 				Tools.PostDebugMessage(string.Format("{0}: Loading field {1}.", this.GetType().Name, fieldName));
 
-				object fieldValue = field.GetValue(this);
+				object fieldValue;
+
+				if (field is FieldInfo)
+				{
+					fieldValue = (field as FieldInfo).GetValue(this);
+				}
+				else
+				{
+					fieldValue = (field as PropertyInfo).GetValue(this, null);
+				}
 
 				bool convertBack = false;
 				if (fieldValue is IVOID_SaveValue)
@@ -219,7 +354,14 @@
 					fieldValue = convertValue;
 				}
 
-				field.SetValue (this, fieldValue);
+				if (field is FieldInfo)
+				{
+					(field as FieldInfo).SetValue(this, fieldValue);
+				}
+				else
+				{
+					(field as PropertyInfo).SetValue(this, fieldValue, null);
+				}
 
 				Tools.PostDebugMessage(string.Format("{0}: Loaded field {1}.", this.GetType().Name, fieldName));
 			}
@@ -227,7 +369,7 @@
 
 		public virtual void _SaveToConfig(KSP.IO.PluginConfiguration config)
 		{
-			foreach (var field in this.GetType().GetFields(
+			foreach (var field in this.GetType().GetMembers(
 				BindingFlags.Instance |
 				BindingFlags.NonPublic |
 				BindingFlags.Public |
@@ -242,9 +384,32 @@
 
 				AVOID_SaveValue attr = attrs.FirstOrDefault () as AVOID_SaveValue;
 
-				string fieldName = string.Format("{0}_{1}", this.GetType().Name, attr.Name);
-
-				object fieldValue = field.GetValue(this);
+				string fieldName;
+
+				if (this is VOIDCore)
+				{
+					fieldName = string.Format("{0}_{1}", this.GetType().Name, attr.Name);
+				}
+				else
+				{
+					fieldName = string.Format(
+						"{0}_{1}_{2}",
+						this.GetType().Name,
+						Enum.GetName(typeof(GameScenes), HighLogic.LoadedScene),
+						attr.Name
+					);
+				}
+
+				object fieldValue;
+
+				if (field is FieldInfo)
+				{
+					fieldValue = (field as FieldInfo).GetValue(this);
+				}
+				else
+				{
+					fieldValue = (field as PropertyInfo).GetValue(this, null);
+				}
 
 				if (fieldValue is IVOID_SaveValue)
 				{
@@ -291,7 +456,9 @@
 				VOID_Tools.GetWindowHandler(this.ModuleWindow),
 				this.Name,
 				GUILayout.Width(this.defWidth),
-				GUILayout.Height(this.defHeight)
+				GUILayout.Height(this.defHeight),
+				GUILayout.ExpandWidth(true),
+				GUILayout.ExpandHeight(true)
 			);
 
 			bool cursorInWindow = _Pos.Contains(Mouse.screenPos);
@@ -326,7 +493,10 @@
 				case GameScenes.SPACECENTER:
 					if (cursorInWindow)
 					{
-						InputLockManager.SetControlLock(ControlTypes.KSC_FACILITIES, this.inputLockName);
+						InputLockManager.SetControlLock(
+							ControlTypes.KSC_FACILITIES | ControlTypes.CAMERACONTROLS,
+							this.inputLockName
+						);
 					}
 					else if (InputLockManager.GetControlLock(this.inputLockName) != ControlTypes.None)
 					{

--- a/Tools/VOID_Tools.cs
+++ b/Tools/VOID_Tools.cs
@@ -34,7 +34,7 @@
 
 namespace VOID
 {
-	public static partial class VOID_Tools
+	public static class VOID_Tools
 	{
 		#region CelestialBody Utilities
 		public static bool hasAncestor(this CelestialBody bodyA, CelestialBody bodyB)
@@ -516,9 +516,9 @@
 
 			public string FormatAsDate()
 			{
-				string format = "Y{0:D1}, D{1:D1} {2:D2}:{3:D2}:{4:00.0}s";
-
-				return string.Format(format, years, days, hours, minutes, seconds);
+				string format = "Y{0:#0}, D{1:#0} {2:00}:{3:00}:{4:00.0}s";
+
+				return string.Format(format, years + 1, days, hours, minutes, seconds);
 			}
 
 			public UnpackedTime(int years, int days, int hours, int minutes, double seconds)

--- a/VOID.csproj
+++ b/VOID.csproj
@@ -111,6 +111,7 @@
     <Compile Include="API\Attributes\VOID_ScenesAttribute.cs" />
     <Compile Include="API\Attributes\AVOID_SaveValue.cs" />
     <Compile Include="API\VOIDMaster.cs" />
+    <Compile Include="API\Attributes\VOID_GameModesAttribute.cs" />
   </ItemGroup>
   <ProjectExtensions>
     <MonoDevelop>

--- a/VOIDCore_Editor.cs
+++ b/VOIDCore_Editor.cs
@@ -36,6 +36,7 @@
 
 namespace VOID
 {
+	[VOID_Scenes(GameScenes.EDITOR)]
 	public class VOIDCore_Editor : VOIDCore_Generic<VOIDCore_Editor>
 	{
 		public VOIDCore_Editor() : base()

--- a/VOIDCore_Flight.cs
+++ b/VOIDCore_Flight.cs
@@ -32,6 +32,7 @@
 
 namespace VOID
 {
+	[VOID_Scenes(GameScenes.FLIGHT)]
 	public class VOIDCore_Flight : VOIDCore_Generic<VOIDCore_Flight>
 	{
 		public VOIDCore_Flight()

--- a/VOIDCore_Generic.cs
+++ b/VOIDCore_Generic.cs
@@ -1,6 +1,6 @@
 // VOID
 //
-// VOID_Core.cs
+// VOIDCore_Generic.cs
 //
 // Copyright © 2014, toadicus
 // All rights reserved.
@@ -47,7 +47,7 @@
 		protected string VoidVersion;
 
 		[AVOID_SaveValue("configValue")]
-		protected VOID_SaveValue<int> configVersion = 1;
+		protected VOID_SaveValue<int> _configVersion = VOIDCore.CONFIG_VERSION;
 
 		protected List<IVOID_Module> _modules = new List<IVOID_Module>();
 		protected bool _modulesLoaded = false;
@@ -127,20 +127,21 @@
 
 		public override bool configDirty { get; set; }
 
-		[AVOID_SaveValue("UseBlizzyToolbar")]
-		protected VOID_SaveValue<bool> _UseToolbarManager;
 		internal IButton ToolbarButton;
 
 		internal ApplicationLauncherButton AppLauncherButton;
 
-		/*
-		 * Events
-		 * */
-
-		// event VOIDEventHandler onApplicationQuit;
 		/*
 		 * Properties
 		 * */
+		public override int configVersion
+		{
+			get
+			{
+				return this._configVersion;
+			}
+		}
+
 		public bool factoryReset
 		{
 			get;
@@ -230,6 +231,7 @@
 			protected set;
 		}
 
+
 		public override double updatePeriod
 		{
 			get
@@ -286,11 +288,11 @@
 		{
 			get
 			{
-				return _UseToolbarManager & ToolbarManager.ToolbarAvailable;
+				return useToolbarManager & ToolbarManager.ToolbarAvailable;
 			}
 			set
 			{
-				if (this._UseToolbarManager == value)
+				if (useToolbarManager == value)
 				{
 					return;
 				}
@@ -311,7 +313,7 @@
 					this.InitializeToolbarButton();
 				}
 
-				_UseToolbarManager.value = value;
+				useToolbarManager = value;
 			}
 		}
 
@@ -322,6 +324,12 @@
 				return HighLogic.LoadedScene.ToAppScenes();
 			}
 		}
+
+		/*
+		 * Events
+		 * */
+		public override event VOIDEventHandler onApplicationQuit;
+		public override event VOIDEventHandler onSkinChanged;
 
 		/*
 		 * Methods
@@ -567,6 +575,18 @@
 					((IVOID_BehaviorModule)module).OnDestroy();
 				}
 			}
+
+			this.Dispose();
+		}
+
+		public virtual void OnApplicationQuit()
+		{
+			if (this.onApplicationQuit != null)
+			{
+				this.onApplicationQuit(this);
+			}
+
+			this.OnDestroy();
 		}
 
 		public void ResetGUI()
@@ -938,6 +958,11 @@
 		{
 			VOID_Styles.OnSkinChanged();
 
+			if (this.onSkinChanged != null)
+			{
+				this.onSkinChanged(this);
+			}
+
 			this.GUIStylesLoaded = true;
 		}
 
@@ -978,7 +1003,7 @@
 			this.ToolbarButton.Text = this.VoidName;
 			this.SetIconTexture(this.powerState | this.activeState);
 
-			this.ToolbarButton.Visibility = new GameScenesVisibility(GameScenes.EDITOR, GameScenes.FLIGHT);
+			this.ToolbarButton.Visible = true;
 
 			this.ToolbarButton.OnClick += 
 				(e) =>
@@ -1086,7 +1111,13 @@
 
 		public override void SaveConfig()
 		{
+			if (this.configNeedsUpdate && this is VOIDCore_Flight)
+			{
+				KSP.IO.File.Delete<T>("config.xml");
+			}
+
 			var config = KSP.IO.PluginConfiguration.CreateForType<T>();
+
 			config.load();
 
 			this._SaveToConfig(config);
@@ -1130,6 +1161,8 @@
 
 			this.LoadConfig();
 
+			this._configVersion = VOIDCore.CONFIG_VERSION;
+			
 			this.SetIconTexture(this.powerState | this.activeState);
 
 			this.factoryReset = false;

--- a/VOIDCore_SpaceCentre.cs
+++ b/VOIDCore_SpaceCentre.cs
@@ -29,6 +29,7 @@
 
 namespace VOID
 {
+	[VOID_Scenes(GameScenes.SPACECENTER)]
 	public class VOIDCore_SpaceCentre : VOIDCore_Generic<VOIDCore_SpaceCentre>
 	{
 		public VOIDCore_SpaceCentre() : base()

--- a/VOID_CareerStatus.cs
+++ b/VOID_CareerStatus.cs
@@ -35,6 +35,7 @@
 namespace VOID
 {
 	[VOID_Scenes(GameScenes.FLIGHT, GameScenes.EDITOR, GameScenes.SPACECENTER)]
+	[VOID_GameModes(Game.Modes.CAREER, Game.Modes.SCIENCE_SANDBOX)]
 	public class VOID_CareerStatus : VOID_WindowModule
 	{
 		public static VOID_CareerStatus Instance
@@ -43,20 +44,25 @@
 			private set;
 		}
 
+		public static string formatDelta(double delta, string numberFormat)
+		{
+			if (delta > 0)
+			{
+				return string.Format("<color='lime'>{0}↑</color>", delta.ToString(numberFormat, Tools.mySIFormatter));
+			}
+			else if (delta < 0)
+			{
+				return string.Format("<color='red'>{0}↓</color>", delta.ToString(numberFormat, Tools.mySIFormatter));
+			}
+			else
+			{
+				return "0";
+			}
+		}
+
 		public static string formatDelta(double delta)
 		{
-			if (delta > 0)
-			{
-				return string.Format("<color='green'>{0:#,#.##}↑</color>", delta);
-			}
-			else if (delta < 0)
-			{
-				return string.Format("<color='red'>{0:#,#.##}↓</color>", delta);
-			}
-			else
-			{
-				return string.Intern("0");
-			}
+			return formatDelta(delta, "#,##0.##");
 		}
 
 		public static string formatDelta(float delta)
@@ -76,18 +82,6 @@
 		private Texture2D scienceIcon;
 		#pragma warning restore 0414
 
-		public override bool toggleActive
-		{
-			get
-			{
-				return base.toggleActive && this.inValidGame;
-			}
-			set
-			{
-				base.toggleActive = this.inValidGame && value;
-			}
-		}
-
 		public double lastFundsChange
 		{
 			get;
@@ -122,21 +116,6 @@
 		{
 			get;
 			private set;
-		}
-
-		private bool inValidGame
-		{
-			get
-			{
-				switch (HighLogic.CurrentGame.Mode)
-				{
-					case Game.Modes.CAREER:
-					case Game.Modes.SCIENCE_SANDBOX:
-						return true;
-					default:
-						return false;
-				}
-			}
 		}
 
 		private bool currenciesInitialized
@@ -221,6 +200,11 @@
 			this.currentScience = newValue;
 		}
 
+		private void onGameStateLoad(ConfigNode node)
+		{
+			this.initCurrencies();
+		}
+
 		private void initCurrencies()
 		{
 			Tools.PostDebugMessage(
@@ -256,6 +240,7 @@
 			GameEvents.OnFundsChanged.Add(this.onFundsChange);
 			GameEvents.OnReputationChanged.Add(this.onRepChange);
 			GameEvents.OnScienceChanged.Add(this.onScienceChange);
+			GameEvents.onGameStateLoad.Add(this.onGameStateLoad);
 
 			bool texturesLoaded;
 
@@ -286,6 +271,7 @@
 			GameEvents.OnFundsChanged.Remove(this.onFundsChange);
 			GameEvents.OnReputationChanged.Remove(this.onRepChange);
 			GameEvents.OnScienceChanged.Remove(this.onScienceChange);
+			GameEvents.onGameStateLoad.Remove(this.onGameStateLoad);
 
 			VOID_CareerStatus.Instance = null;
 		}

--- a/VOID_Styles.cs
+++ b/VOID_Styles.cs
@@ -121,6 +121,8 @@
 
 		static VOID_Styles()
 		{
+			OnSkinChanged();
+
 			Ready = false;
 		}
 	}