Esempio n. 1
0
        public void Save()
        {
            try
            {
                ConfigNode node = HISTORIANCFG.Node;

                node.SetValue("Version", CurrentVersion.ToString(), true);
                node.SetValue("Layout", Layout, true);
                node.SetValue("EnableLauncherButton", EnableLauncherButton, true);
                node.SetValue("EnableToolbarButton", EnableToolbarButton, true);
                node.SetValue("AutoHideUI", AutoHideUI, true);
                node.SetValue("CustomText", CustomText, true);
                node.SetValue("PersistentCustomText", PersistentCustomText, true);
                node.SetValue("PersistentConfigurationWindow", PersistentConfigurationWindow, true);
                node.SetValue("DefaultSpaceCenterName", DefaultSpaceCenterName, true);
                node.SetValue("TimeToRememberLastAction", TimeToRememberLastAction, true);
                node.SetValue("KerbinDayNames", string.Join(";", KerbinDayNames), true);
                node.SetValue("KerbinMonthNames", string.Join(";", KerbinMonthNames), true);
                node.SetValue("RightClickAction", RightClickAction.ToString(), true);
                node.SetValue("DefaultNoCrewLabel", DefaultNoCrewLabel, true);
                node.SetValue("DefaultUnmannedLabel", DefaultUnmannedLabel, true);

                HISTORIANCFG.Save();

                Historian.Print($"Configuration saved at '{HISTORIANCFG.KspPath}'.");
            }
            catch
            {
                Historian.Print($"Failed to save configuration file '{HISTORIANCFG}'.");
            }
        }
Esempio n. 2
0
 void Start()
 {
     destination = TravelTo;
 }