diff --git a/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll b/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll index 74f65c1..27530f4 100644 Binary files a/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll and b/Distribution/GameData/ConformalDecals/Plugins/ConformalDecals.dll differ diff --git a/Source/ConformalDecals/ConformalDecalConfig.cs b/Source/ConformalDecals/ConformalDecalConfig.cs index 7a0f27e..d1e990c 100644 --- a/Source/ConformalDecals/ConformalDecalConfig.cs +++ b/Source/ConformalDecals/ConformalDecalConfig.cs @@ -2,8 +2,7 @@ using System.Collections.Generic; using UnityEngine; namespace ConformalDecals { - [KSPAddon(KSPAddon.Startup.Instantly, true)] - public class ConformalDecalConfig : MonoBehaviour { + public static class ConformalDecalConfig { private static List _shaderBlacklist; public static bool IsBlacklisted(Shader shader) { @@ -14,7 +13,7 @@ namespace ConformalDecals { return _shaderBlacklist.Contains(shaderName); } - private void ParseConfig(ConfigNode node) { + private static void ParseConfig(ConfigNode node) { foreach (var blacklist in node.GetNodes("SHADERBLACKLIST")) { foreach (var shaderName in blacklist.GetValuesList("shader")) { _shaderBlacklist.Add(shaderName); @@ -22,13 +21,13 @@ namespace ConformalDecals { } } - private void Start() { + public static void ModuleManagerPostLoad() { _shaderBlacklist = new List(); var configs = GameDatabase.Instance.GetConfigs("CONFORMALDECALS"); if (configs.Length > 0) { - Debug.Log("DecalConfig loading config"); + Debug.Log("ConformalDecals: loading config"); foreach (var config in configs) { ParseConfig(config.config); }