Esempio n. 1
0
 public void HailerDeactivate()
 {
     hailerActive = false;
     if (!base.vessel.FindPartModulesImplementing <ESLDHailer>().Any((ESLDHailer hailer) => hailer.hailerActive))
     {
         HailerGUI.CloseGUI(base.vessel);
     }
     base.Events["HailerDeactivate"].active = false;
     base.Events["HailerActivate"].active   = true;
     base.Events["HailerGUIOpen"].active    = false;
     base.Events["HailerGUIClose"].active   = false;
     ((BaseFieldList <BaseField, KSPField>)base.Fields)["hasNearBeacon"].guiActive      = false;
     ((BaseFieldList <BaseField, KSPField>)base.Fields)["nearBeaconDistance"].guiActive = false;
     ((BaseFieldList <BaseField, KSPField>)base.Fields)["nearBeaconRelVel"].guiActive   = false;
 }
Esempio n. 2
0
        public void OnVesselChange(Vessel vessel)
        {
            HailerGUI.CloseGUI(this.vessel);
            this.vessel = vessel;

            hailer = vessel?.FindPartModulesImplementing <ESLDHailer>().FirstOrDefault();

            canHail = hailer != null;

            if (canHail && button == null)
            {
                OnGUIApplicationLauncherReady();
            }
            else if (!canHail && button != null)
            {
                KillButton();
            }
        }
Esempio n. 3
0
 public void HailerGUIClose()
 {
     base.Events["HailerGUIClose"].active = false;
     base.Events["HailerGUIOpen"].active  = true;
     HailerGUI.CloseGUI(base.vessel);
 }