コード例 #1
0
 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();
         }
     }
 }
コード例 #2
0
ファイル: EditorReCoupler.cs プロジェクト: DBooots/ReCoupler
        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);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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);
            }
        }