public static void SaveConfigs() { config.SetValue("displayForces", FARDebugValues.displayForces.ToString()); config.SetValue("displayCoefficients", FARDebugValues.displayCoefficients.ToString()); config.SetValue("displayShielding", FARDebugValues.displayShielding.ToString()); config.SetValue("useSplinesForSupersonicMath", FARDebugValues.useSplinesForSupersonicMath.ToString()); config.SetValue("allowStructuralFailures", FARDebugValues.allowStructuralFailures.ToString()); FARAeroUtil.SaveCustomAeroDataToConfig(); FARPartClassification.SaveCustomClassificationTemplates(); FARAeroStress.SaveCustomStressTemplates(); config.save(); }
public static void LoadConfigs() { config = KSP.IO.PluginConfiguration.CreateForType <FARDebugOptions>(); config.load(); FARDebugValues.displayForces = Convert.ToBoolean(config.GetValue("displayForces", "false")); FARDebugValues.displayCoefficients = Convert.ToBoolean(config.GetValue("displayCoefficients", "false")); FARDebugValues.displayShielding = Convert.ToBoolean(config.GetValue("displayShielding", "false")); FARDebugValues.useSplinesForSupersonicMath = Convert.ToBoolean(config.GetValue("useSplinesForSupersonicMath", "true")); FARDebugValues.allowStructuralFailures = Convert.ToBoolean(config.GetValue("allowStructuralFailures", "true")); FARAeroStress.LoadStressTemplates(); FARPartClassification.LoadClassificationTemplates(); FARAeroUtil.LoadAeroDataFromConfig(); }
public static void LoadConfigs() { config = KSP.IO.PluginConfiguration.CreateForType <FAREditorGUI>(); config.load(); FARControlSys.windowPos = config.GetValue("FlightWindowPos", new Rect(100, 100, 150, 100)); FARControlSys.AutopilotWinPos = config.GetValue("AutopilotWinPos", new Rect()); FARControlSys.HelpWindowPos = config.GetValue("HelpWindowPos", new Rect()); FARControlSys.FlightDataPos = config.GetValue("FlightDataPos", new Rect()); FARControlSys.FlightDataHelpPos = config.GetValue("FlightDataHelpPos", new Rect()); FARControlSys.AirSpeedPos = config.GetValue("AirSpeedPos", new Rect()); FARControlSys.AirSpeedHelpPos = config.GetValue("AirSpeedHelpPos", new Rect()); FARControlSys.AeroForceTintingPos = config.GetValue("AeroForceTintingPos", new Rect()); //FARControlSys.minimize = config.GetValue<bool>("FlightGUIBool", false); FARControlSys.k_wingleveler_str = config.GetValue("k_wingleveler", "0.05"); FARControlSys.k_wingleveler = Convert.ToDouble(FARControlSys.k_wingleveler_str); FARControlSys.kd_wingleveler_str = config.GetValue("kd_wingleveler", "0.002"); FARControlSys.kd_wingleveler = Convert.ToDouble(FARControlSys.kd_wingleveler_str); FARControlSys.k_yawdamper_str = config.GetValue("k_yawdamper", "0.1"); FARControlSys.k_yawdamper = Convert.ToDouble(FARControlSys.k_yawdamper_str); FARControlSys.k_pitchdamper_str = config.GetValue("k_pitchdamper", "0.25"); FARControlSys.k_pitchdamper = Convert.ToDouble(FARControlSys.k_pitchdamper_str); FARControlSys.k2_pitchdamper_str = config.GetValue("k2_pitchdamper", "0.06"); FARControlSys.k2_pitchdamper = Convert.ToDouble(FARControlSys.k2_pitchdamper_str); FARControlSys.scaleVelocity_str = config.GetValue("scaleVelocity", "150"); FARControlSys.scaleVelocity = Convert.ToDouble(FARControlSys.scaleVelocity_str); FARControlSys.alt_str = config.GetValue("alt", "0"); FARControlSys.alt = Convert.ToDouble(FARControlSys.alt_str); FARControlSys.upperLim_str = config.GetValue("upperLim", "25"); FARControlSys.upperLim = Convert.ToDouble(FARControlSys.upperLim_str); FARControlSys.lowerLim_str = config.GetValue("lowerLim", "-25"); FARControlSys.lowerLim = Convert.ToDouble(FARControlSys.lowerLim_str); FARControlSys.k_limiter_str = config.GetValue("k_limiter", "0.25"); FARControlSys.k_limiter = Convert.ToDouble(FARControlSys.k_limiter_str); FARControlSys.unitMode = (FARControlSys.SurfaceVelUnit)config.GetValue("unitMode", 0); FARControlSys.velMode = (FARControlSys.SurfaceVelMode)config.GetValue("velMode", 0); FARDebugValues.displayForces = Convert.ToBoolean(config.GetValue("displayForces", "false")); FARDebugValues.displayCoefficients = Convert.ToBoolean(config.GetValue("displayCoefficients", "false")); FARDebugValues.displayShielding = Convert.ToBoolean(config.GetValue("displayShielding", "false")); FARDebugValues.useSplinesForSupersonicMath = Convert.ToBoolean(config.GetValue("useSplinesForSupersonicMath", "true")); FARDebugValues.allowStructuralFailures = Convert.ToBoolean(config.GetValue("allowStructuralFailures", "true")); FARAeroStress.LoadStressTemplates(); FARPartClassification.LoadClassificationTemplates(); FARAeroUtil.LoadAeroDataFromConfig(); }
public static void SaveConfigs() { config.SetValue("displayForces", FARDebugValues.displayForces.ToString()); config.SetValue("displayCoefficients", FARDebugValues.displayCoefficients.ToString()); config.SetValue("displayShielding", FARDebugValues.displayShielding.ToString()); config.SetValue("useSplinesForSupersonicMath", FARDebugValues.useSplinesForSupersonicMath.ToString()); config.SetValue("allowStructuralFailures", FARDebugValues.allowStructuralFailures.ToString()); config.SetValue("useBlizzyToolbar", FARDebugValues.useBlizzyToolbar.ToString()); FARDebugValues.useBlizzyToolbar &= ToolbarManager.ToolbarAvailable; FARAeroUtil.SaveCustomAeroDataToConfig(); FARPartClassification.SaveCustomClassificationTemplates(); FARAeroStress.SaveCustomStressTemplates(); FARActionGroupConfiguration.SaveConfigruration(); FAREditorGUI.SaveCustomColors(); config.save(); }
public static void LoadConfigs() { config = KSP.IO.PluginConfiguration.CreateForType <FARDebugOptions>(); config.load(); FARDebugValues.displayForces = Convert.ToBoolean(config.GetValue("displayForces", "false")); FARDebugValues.displayCoefficients = Convert.ToBoolean(config.GetValue("displayCoefficients", "false")); FARDebugValues.displayShielding = Convert.ToBoolean(config.GetValue("displayShielding", "false")); FARDebugValues.useSplinesForSupersonicMath = Convert.ToBoolean(config.GetValue("useSplinesForSupersonicMath", "true")); FARDebugValues.allowStructuralFailures = Convert.ToBoolean(config.GetValue("allowStructuralFailures", "true")); FARDebugValues.useBlizzyToolbar = Convert.ToBoolean(config.GetValue("useBlizzyToolbar", "false")); FARAeroStress.LoadStressTemplates(); FARPartClassification.LoadClassificationTemplates(); FARAeroUtil.LoadAeroDataFromConfig(); FARActionGroupConfiguration.LoadConfiguration(); FAREditorGUI.LoadColors(); ReColorTexture(ref FAREditorGUI.clColor, ref cLTexture); ReColorTexture(ref FAREditorGUI.cdColor, ref cDTexture); ReColorTexture(ref FAREditorGUI.cmColor, ref cMTexture); ReColorTexture(ref FAREditorGUI.l_DColor, ref l_DTexture); }