Example #1
0
        public void Start()
        {
            string finalPath = KSPUtil.ApplicationRootPath + "saves/" + HighLogic.SaveFolder + "/SimuLite_backup.sfs";

            if (HighLogic.LoadedSceneIsGame && !(HighLogic.LoadedSceneIsFlight || HighLogic.LoadedSceneIsEditor))
            { //Don't load the backup if currently in the flight scene
                SimuLite.LoadBackupFile(HighLogic.LoadedScene);
            }
        }
Example #2
0
        //public void Awake()
        //{
        //    if (HighLogic.LoadedSceneIsEditor && KSP.UI.Screens.StageManager.Instance != null)
        //    {
        //        Destroy(KSP.UI.Screens.StageManager.Instance);
        //    }
        //}

        public void Start()
        {
            if (Instance == null)
            {
                Instance = this;
            }
            //load config
            Configuration.LoadFromFile();
            Configuration.SaveToFile();

            if (HighLogic.LoadedSceneIsEditor) //hacky hack for now
            {
                simConfigWindow.Show();
            }
            if (StaticInformation.IsSimulating && HighLogic.LoadedSceneIsFlight)
            {
                lastUT = Planetarium.GetUniversalTime();
            }
        }