void OnMouseDown() { if (!initialized) { Initialize(); } if (HighLogic.LoadedScene == GameScenes.FLIGHT && !InputLockManager.IsLocked(ControlTypes.FLIGHTUIMODE)) { FacilityManager.selectedInstance = facility.staticInstance; FacilityManager.instance.Open(); } if (HighLogic.LoadedScene == GameScenes.SPACECENTER && !InputLockManager.IsLocked(ControlTypes.KSC_FACILITIES) && !(InputLockManager.GetControlLock("KK_KSC") == ControlTypes.UI)) { staticInstance.HighlightObject(Color.clear); SpaceCenterAction(); } }
void OnMouseDown() { if (HighLogic.LoadedScene == GameScenes.SPACECENTER && !InputLockManager.IsLocked(ControlTypes.KSC_FACILITIES)) { EditorFacility facility; staticInstance.HighlightObject(Color.clear); if (staticInstance.launchSite.LaunchSiteType == SiteType.VAB) { facility = EditorFacility.VAB; } else { facility = EditorFacility.SPH; } EditorDriver.StartupBehaviour = EditorDriver.StartupBehaviours.START_CLEAN; EditorDriver.StartEditor(facility); } }