private void EngageSmartASSOrbitalControl(MechJebModuleSmartASS.Target target) { MechJebCore masterMechJeb = this.vessel.GetMasterMechJeb(); if (masterMechJeb != null) { MechJebModuleSmartASS masterSmartASS = masterMechJeb.GetComputerModule <MechJebModuleSmartASS>(); if (masterSmartASS != null && !masterSmartASS.hidden) { masterSmartASS.mode = MechJebModuleSmartASS.Mode.ORBITAL; masterSmartASS.target = target; masterSmartASS.Engage(); } else { //Log.err(Localizer.Format("#MechJeb_LogError_msg1"));//"MechJeb couldn't find MechJebModuleSmartASS for orbital control via action group." Log.err("couldn't find MechJebModuleSmartASS for orbital control via action group."); } } else { //Log.err(Localizer.Format("#MechJeb_LogError_msg0"));//"MechJeb couldn't find the master MechJeb module for the current vessel." Log.err("couldn't find the master MechJeb module for the current vessel."); } }
private void EngageSmartASSOrbitalControl(MechJebModuleSmartASS.Target target) { MechJebCore masterMechJeb = this.vessel.GetMasterMechJeb(); if (masterMechJeb != null) { MechJebModuleSmartASS masterSmartASS = masterMechJeb.GetComputerModule <MechJebModuleSmartASS>(); if (masterSmartASS != null) { masterSmartASS.mode = MechJebModuleSmartASS.Mode.ORBITAL; masterSmartASS.target = target; masterSmartASS.Engage(); } else { Debug.LogError("MechJeb couldn't find MechJebModuleSmartASS for orbital control via action group."); } } else { Debug.LogError("MechJeb couldn't find the master MechJeb module for the current vessel."); } }
public void EngageSmartASSControl(MechJebModuleSmartASS.Mode mode, MechJebModuleSmartASS.Target target, bool forceEnable) { MechJebCore masterMechJeb = this.vessel.GetMasterMechJeb(); if (masterMechJeb != null) { MechJebModuleSmartASS masterSmartASS = masterMechJeb.GetComputerModule <MechJebModuleSmartASS>(); if (masterSmartASS != null) { if (forceEnable) { // Prevent that the presence of other attitude controllers disables SmartASS masterSmartASS.autoDisableSmartASS = false; } masterSmartASS.mode = mode; masterSmartASS.target = target; masterSmartASS.Engage(); masterSmartASS.enabled = true; // show GUI } else { Debug.LogError("MechJeb couldn't find MechJebModuleSmartASS for control."); } } else { Debug.LogError("MechJeb couldn't find the master MechJeb module for the current vessel."); } }