private void Unlink() { // Unload tube renderer if (linkedStrutModule) { linkedStrutModule.UnlinkPump(); linkedStrutModule.strutRenderer.UnLoad(); linkedStrutModule.linked = false; linkedStrutModule.Events["ContextMenuUnlink"].guiActiveUnfocused = false; linkedStrutModule.Events["ContextMenuLink"].guiActiveUnfocused = true; linkedStrutModule.Events["ContextMenuTogglePump"].active = false; KAS_Shared.InvalidateContextMenu(linkedStrutModule.part); } this.UnlinkPump(); this.strutRenderer.UnLoad(); this.linked = false; tgtStrutPartID = null; tgtStrutVesselID = null; this.Events["ContextMenuUnlink"].guiActiveUnfocused = false; this.Events["ContextMenuLink"].guiActiveUnfocused = true; this.Events["ContextMenuTogglePump"].active = false; KAS_Shared.InvalidateContextMenu(this.part); // Detach parts if (linkedStrutModule) { linkedStrutModule.Detach(); } this.Detach(); // Clean references if (linkedStrutModule) { linkedStrutModule.linkedStrutModule = null; } this.linkedStrutModule = null; }
private void Unlink() { // Unload tube renderer if (linkedStrutModule) { linkedStrutModule.strutRenderer.UnLoad(); linkedStrutModule.linked = false; linkedStrutModule.Events["ContextMenuUnlink"].guiActiveUnfocused = false; linkedStrutModule.Events["ContextMenuLink"].guiActiveUnfocused = true; } this.strutRenderer.UnLoad(); this.linked = false; this.Events["ContextMenuUnlink"].guiActiveUnfocused = false; this.Events["ContextMenuLink"].guiActiveUnfocused = true; // Detach parts if (linkedStrutModule) { linkedStrutModule.Detach(); } this.Detach(); // Clean references if (linkedStrutModule) { linkedStrutModule.linkedStrutModule = null; } this.linkedStrutModule = null; }