Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Commit

Permalink
fix editor reentry blowing up
Browse files Browse the repository at this point in the history
  • Loading branch information
Crzyrndm committed Oct 17, 2016
1 parent 72ac53a commit 0e4e4e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
14 changes: 2 additions & 12 deletions FilterExtension/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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<FESettings>().debug)
Core.Log("Starting on Stock Filters", Core.LogLevel.Log);
Expand Down
2 changes: 1 addition & 1 deletion FilterExtension/Utility/PartType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public static bool checkModuleNameType(AvailablePart part, string value)
return part.partPrefab.Modules.Contains<ModuleWheelSubmodule>();
case "ModuleWheelSuspension":
return part.partPrefab.Modules.Contains<ModuleWheelSuspension>();
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<string, PartModule>();
Expand Down
Binary file modified GameData/000_FilterExtensions/FilterExtensions.dll
Binary file not shown.

0 comments on commit 0e4e4e1

Please sign in to comment.