diff --git a/AdjustableModPanel.cs b/AdjustableModPanel.cs index a5730e9..95ecac7 100644 --- a/AdjustableModPanel.cs +++ b/AdjustableModPanel.cs @@ -486,7 +486,7 @@ private void OnGUIApplicationLauncherUnreadifying (GameScenes scene) { } public void AppButtonDisable () { - CloseMainWindow (); + appButton?.SetFalse (); } public void AppButtonEnable () { @@ -518,7 +518,7 @@ internal bool ForceUpdate { internal void RecordMod (string descriptor, ApplicationLauncher.AppScenes visibleInScenes, ApplicationLauncher.AppScenes alwaysOn,Texture2D texture) { if (!modList.ContainsKey (descriptor)) { - Debug.Log ("[Adjustable Mod Panel] Recorded a new mod: " + descriptor); + Debug.Log ("[Adjustable Mod Panel] Recorded a new mod: " + descriptor.Split ('+')[0]); modList[descriptor] = new KeyValuePair (visibleInScenes, texture); } else { // update the value in case the visibility was expanded by the mod @@ -526,8 +526,11 @@ internal void RecordMod (string descriptor, ApplicationLauncher.AppScenes visibl } if (!modMatrix.ContainsKey (descriptor)) modMatrix[descriptor] = visibleInScenes; - - modMatrixAlwaysOn[descriptor] = alwaysOn; + if (!modMatrixAlwaysOn.ContainsKey (descriptor)) { + if (alwaysOn != ApplicationLauncher.AppScenes.NEVER) + Debug.Log ("[Adjustable Mod Panel] Mod " + descriptor.Split('+')[0] + " requests to be unswitchable in scenes: " + alwaysOn); + modMatrixAlwaysOn[descriptor] = alwaysOn; + } } #region Config diff --git a/ModPanelComponent.cs b/ModPanelComponent.cs index 80f2aee..4d2bb25 100644 --- a/ModPanelComponent.cs +++ b/ModPanelComponent.cs @@ -40,7 +40,7 @@ public void Awake () { if (modlist == null) { // no modlist, nothing to do - Debug.Log ("[Adjustable Mod Panel] No mod panel found, exiting now."); + Debug.Log ("[Adjustable Mod Panel] ERROR: No mod panel found, exiting now."); Destroy (this); } } @@ -69,7 +69,6 @@ public void Update () { KSP.UI.Screens.ApplicationLauncher.AppScenes alwaysOn = KSP.UI.Screens.ApplicationLauncher.AppScenes.NEVER; if (button.container.Data is KSP.UI.Screens.ApplicationLauncher.AppScenes) { - Debug.Log ("[Adjustable Mod Panel] Mod " + module + " requests to be unswitchable in scenes: " + button.container.Data); alwaysOn = (KSP.UI.Screens.ApplicationLauncher.AppScenes)button.container.Data; }