示例#1
0
        void Start()
        {
            Log("Starting");
            try
            {
                mucore.init();
                vesselState = new VesselState();
                attitude    = new AttitudeController(this);
                stage       = new StageController(this);
                attitude.OnStart();
                stagestats            = new StageStats(stage);
                stagestats.editorBody = getVessel.mainBody;
                stagestats.OnModuleEnabled();
                stagestats.OnFixedUpdate();
                stagestats.RequestUpdate(this);
                stagestats.OnFixedUpdate();
                CreateButtonIcon();
                LaunchName = new string(getVessel.vesselName.ToCharArray());
                LaunchBody = getVessel.mainBody;
                launchdb   = new LaunchDB(this);
                launchdb.Load();

                mainWindow      = new Window.MainWindow(this, 6378070);
                flightMapWindow = new Window.FlightMapWindow(this, 548302);
                statsWindow     = new Window.StatsWindow(this, 6378070 + 4);

                GameEvents.onShowUI.Add(ShowGUI);
                GameEvents.onHideUI.Add(HideGUI);
            }
            catch (Exception ex)
            {
                Log(ex.ToString());
            }
        }
示例#2
0
        void Start()
        {
            instance = this;
            Log("Starting");
            try
            {
                mucore.init();
                vesselState = new VesselState();
                attitude    = new AttitudeController(this);
                stage       = new StageController(this);
                attitude.OnStart();
                stagestats            = new StageStats(stage);
                stagestats.editorBody = getVessel.mainBody;
                stagestats.OnModuleEnabled();
                stagestats.OnFixedUpdate();
                stagestats.RequestUpdate(this);
                stagestats.OnFixedUpdate();
                CreateButtonIcon();
                LaunchName = new string(getVessel.vesselName.ToCharArray());
                LaunchBody = getVessel.mainBody;
                launchdb   = new LaunchDB(this);
                launchdb.Load();

                mainWindow      = new Window.MainWindow(this, 6378070);
                flightMapWindow = new Window.FlightMapWindow(this, 548302);
                statsWindow     = new Window.StatsWindow(this, 6378070 + 4);
                double h = 80f;
                if (FlightGlobals.ActiveVessel.mainBody.atmosphere)
                {
                    h = Math.Max(h, FlightGlobals.ActiveVessel.mainBody.atmosphereDepth + 10000f);
                    DestinationHeight = new EditableValue(h, locked: true) / 1000;
                }

                delayUT = double.NaN;

                GameEvents.onShowUI.Add(ShowGUI);
                GameEvents.onHideUI.Add(HideGUI);

                LoadKeybind();
            }
            catch (Exception ex)
            {
                Log(ex.ToString());
            }
        }
示例#3
0
 public string GetFlightMapFilename()
 {
     return(LaunchDB.GetBaseFilePath(this.GetType(), string.Format("gt_vessel_{0}_{1}.png", LaunchName, LaunchBody.name)));
 }
示例#4
0
 string ConfigFilename(Vessel vessel)
 {
     return(LaunchDB.GetBaseFilePath(this.GetType(), string.Format("gt_vessel_{0}_{1}.cfg", vessel.id.ToString(), vessel.mainBody.name)));
 }
示例#5
0
 string DefaultConfigFilename(Vessel vessel)
 {
     return(LaunchDB.GetBaseFilePath(this.GetType(), string.Format("gt_vessel_default_{0}.cfg", vessel.mainBody.name)));
 }
示例#6
0
 public string GetFilename()
 {
     return(LaunchDB.GetBaseFilePath(turner.GetType(), string.Format("gt_launchdb_{0}_{1}.cfg", turner.LaunchName, turner.LaunchBody.name)));
 }
示例#7
0
        string DefaultConfigFilename(Vessel vessel)
        {
            string name = vessel.mainBody.name.Replace('"', '_');

            return(LaunchDB.GetBaseFilePath(this.GetType(), string.Format("gt_vessel_default_{0}.cfg", name)));
        }
示例#8
0
        internal static string ConfigFilename(Vessel vessel)
        {
            string name = vessel.mainBody.name.Replace('"', '_');

            return(LaunchDB.GetBaseFilePath(instance.GetType(), string.Format("gt_vessel_{0}_{1}.cfg", vessel.id.ToString(), name)));
        }