diff --git a/FilterExtension/Editor.cs b/FilterExtension/Editor.cs index 8ce278c8..bd4c7cfd 100644 --- a/FilterExtension/Editor.cs +++ b/FilterExtension/Editor.cs @@ -19,11 +19,7 @@ public class Editor : MonoBehaviour public void Awake() { - if (!eventRegistered) - { - eventRegistered = true; - GameEvents.onGUIEditorToolbarReady.Add(StartEditor); - } + GameEvents.onGUIEditorToolbarReady.Add(StartEditor); } public void StartEditor() @@ -38,13 +34,7 @@ public void StartEditor() public IEnumerator editorInit() { - //ready = false; - - //while (PartCategorizer.Instance == null) - //{ - // Debug.Log("PartCategorizer is null"); - // yield return null; - //} + GameEvents.onGUIEditorToolbarReady.Remove(StartEditor); if (HighLogic.CurrentGame.Parameters.CustomParams().debug) Core.Log("Starting on Stock Filters", Core.LogLevel.Log); diff --git a/FilterExtension/Utility/PartType.cs b/FilterExtension/Utility/PartType.cs index 76f2b75a..e0eb7602 100644 --- a/FilterExtension/Utility/PartType.cs +++ b/FilterExtension/Utility/PartType.cs @@ -300,7 +300,7 @@ public static bool checkModuleNameType(AvailablePart part, string value) return part.partPrefab.Modules.Contains(); case "ModuleWheelSuspension": return part.partPrefab.Modules.Contains(); - default: // use specialisation where I can to avoid the slow type checking this entails + default: // use specialisation where I can to avoid the "slow" type checking this entails if (loaded_modules == null) { loaded_modules = new Dictionary(); diff --git a/GameData/000_FilterExtensions/FilterExtensions.dll b/GameData/000_FilterExtensions/FilterExtensions.dll index 94c521a0..ea783649 100644 Binary files a/GameData/000_FilterExtensions/FilterExtensions.dll and b/GameData/000_FilterExtensions/FilterExtensions.dll differ