public void Start() { ReCouplerSettings.LoadSettings(); this.connectRadius_string = ReCouplerSettings.connectRadius.ToString(); this.connectAngle_string = ReCouplerSettings.connectAngle.ToString(); this.allowRoboJoints_bool = ReCouplerSettings.allowRoboJoints; this.allowKASJoints_bool = ReCouplerSettings.allowKASJoints; if (!ReCouplerSettings.showGUI) { highlightOn = false; if (button != null) { button.SetFalse(true); ApplicationLauncher.Instance.RemoveModApplication(button); } if (appLauncherEventSet) { GameEvents.onGUIApplicationLauncherReady.Remove(OnGuiApplicationLauncherReady); } if (blizzyToolbarButton != null) { blizzyToolbarButton.Destroy(); } } }
void Start() { ReCouplerSettings.LoadSettings(); GameEvents.onEditorPartEvent.Add(OnEditorPartEvent); GameEvents.onEditorRedo.Add(OnEditorUnRedo); GameEvents.onEditorUndo.Add(OnEditorUnRedo); GameEvents.onEditorLoad.Add(OnEditorLoad); GameEvents.onEditorRestart.Add(OnEditorRestart); GameEvents.onGameSceneSwitchRequested.Add(OnGameSceneSwitchRequested); ResetAndRebuild(forbidAdding: true); //GameEvents.onEditorShipModified.Add(OnEditorShipModified); }
public static IEnumerable <EditorReCoupler.EditorJointTracker> Generate_Editor(ShipConstruct vessel, List <AttachNode> openNodes = null) { if (openNodes == null) { openNodes = new List <AttachNode>(); } if (!ReCouplerSettings.settingsLoaded) { ReCouplerSettings.LoadSettings(); } List <EditorReCoupler.EditorJointTracker> joints = new List <EditorReCoupler.EditorJointTracker>(); foreach (AbstractJointTracker newJoint in checkPartsList(vessel.parts, openNodes, JointType.EditorJointTracker)) { yield return((EditorReCoupler.EditorJointTracker)newJoint); } }
public static IEnumerable <FlightReCoupler.FlightJointTracker> Generate_Flight(Vessel vessel, List <AttachNode> openNodes = null) { if (openNodes == null) { openNodes = new List <AttachNode>(); } if (!ReCouplerSettings.settingsLoaded) { ReCouplerSettings.LoadSettings(); } List <FlightReCoupler.FlightJointTracker> joints = new List <FlightReCoupler.FlightJointTracker>(); foreach (AbstractJointTracker newJoint in checkPartsList(vessel.parts, openNodes, JointType.FlightJointTracker)) { yield return((FlightReCoupler.FlightJointTracker)newJoint); } }