public static void Parse() { var cfg = Lib.ParseConfig("Kerbalism/Kerbalism"); // profile used Profile = Lib.ConfigValue(cfg, "Profile", string.Empty); // user-defined features Reliability = Lib.ConfigValue(cfg, "Reliability", false); Deploy = Lib.ConfigValue(cfg, "Deploy", false); Science = Lib.ConfigValue(cfg, "Science", false); SpaceWeather = Lib.ConfigValue(cfg, "SpaceWeather", false); Automation = Lib.ConfigValue(cfg, "Automation", false); // pressure PressureFactor = Lib.ConfigValue(cfg, "PressureFactor", 10.0); PressureThreshold = Lib.ConfigValue(cfg, "PressureThreshold", 0.9); // poisoning PoisoningFactor = Lib.ConfigValue(cfg, "PoisoningFactor", 0.0); PoisoningThreshold = Lib.ConfigValue(cfg, "PoisoningThreshold", 0.02); // humidity HumidityFactor = Lib.ConfigValue(cfg, "HumidityFactor", 1.0); HumidityThreshold = Lib.ConfigValue(cfg, "HumidityThreshold", 0.95); // signal UnlinkedControl = Lib.ConfigEnum(cfg, "UnlinkedControl", UnlinkedCtrl.none); // science ScienceDialog = Lib.ConfigValue(cfg, "ScienceDialog", true); // reliability QualityScale = Lib.ConfigValue(cfg, "QualityScale", 4.0); // crew level LaboratoryCrewLevelBonus = Lib.ConfigValue(cfg, "LaboratoryCrewLevelBonus", 0.2); MaxLaborartoryBonus = Lib.ConfigValue(cfg, "MaxLaborartoryBonus", 2.0); HarvesterCrewLevelBonus = Lib.ConfigValue(cfg, "HarvesterCrewLevelBonus", 0.1); MaxHarvesterBonus = Lib.ConfigValue(cfg, "MaxHarvesterBonus", 2.0); // misc EnforceCoherency = Lib.ConfigValue(cfg, "EnforceCoherency", true); TrackingPivot = Lib.ConfigValue(cfg, "TrackingPivot", true); HeadLampsCost = Lib.ConfigValue(cfg, "HeadLampsCost", 0.002); LowQualityRendering = Lib.ConfigValue(cfg, "LowQualityRendering", false); UIScale = Lib.ConfigValue(cfg, "UIScale", 1.0f); UIPanelWidthScale = Lib.ConfigValue(cfg, "UIPanelWidthScale", 1.0f); }
public static void parse() { var cfg = Lib.ParseConfig("Kerbalism/Kerbalism"); // profile used Profile = Lib.ConfigValue(cfg, "Profile", string.Empty); // user-defined features Reliability = Lib.ConfigValue(cfg, "Reliability", false); Signal = Lib.ConfigValue(cfg, "Signal", false); Science = Lib.ConfigValue(cfg, "Science", false); SpaceWeather = Lib.ConfigValue(cfg, "SpaceWeather", false); Automation = Lib.ConfigValue(cfg, "Automation", false); // temperature SurvivalTemperature = Lib.ConfigValue(cfg, "SurvivalTemperature", 295.0); SurvivalRange = Lib.ConfigValue(cfg, "SurvivalRange", 5.0); // quality-of-life IdealLivingSpace = Lib.ConfigValue(cfg, "IdealLivingSpace", 40.0); ComfortFirmGround = Lib.ConfigValue(cfg, "ComfortFirmGround", 0.4); ComfortExercise = Lib.ConfigValue(cfg, "ComfortExercise", 0.2); ComfortNotAlone = Lib.ConfigValue(cfg, "ComfortNotAlone", 0.1); ComfortCallHome = Lib.ConfigValue(cfg, "ComfortCallHome", 0.1); ComfortPanorama = Lib.ConfigValue(cfg, "ComfortPanorama", 0.1); // pressure PressureFactor = Lib.ConfigValue(cfg, "PressureFactor", 10.0); PressureThreshold = Lib.ConfigValue(cfg, "PressureThreshold", 0.9); // poisoning PoisoningFactor = Lib.ConfigValue(cfg, "PoisoningFactor", 0.0); PoisoningThreshold = Lib.ConfigValue(cfg, "PoisoningThreshold", 0.02); // radiation ShieldingEfficiency = Lib.ConfigValue(cfg, "ShieldingEfficiency", 0.9); StormRadiation = Lib.ConfigValue(cfg, "StormRadiation", 5.0) / 3600.0; // 5.0 rad/h ExternRadiation = Lib.ConfigValue(cfg, "ExternRadiation", 0.04) / 3600.0; // 0.04 rad/h // storm StormMinTime = Lib.ConfigValue(cfg, "StormMinTime", 2160000.0); // 100 days StormMaxTime = Lib.ConfigValue(cfg, "StormMaxTime", 8640000.0); // 400 days StormDuration = Lib.ConfigValue(cfg, "StormDuration", 21600.0); // 1 day StormEjectionSpeed = Lib.ConfigValue(cfg, "StormEjectionSpeed", 1000000.0); // 0.33% c // signal UnlinkedControl = Lib.ConfigEnum (cfg, "UnlinkedControl", UnlinkedCtrl.none); ExtendedAntenna = Lib.ConfigValue(cfg, "ExtendedAntenna", true); // science ScienceDialog = Lib.ConfigValue(cfg, "ScienceDialog", true); // reliability QualityScale = Lib.ConfigValue(cfg, "QualityScale", 4.0); CriticalChance = Lib.ConfigValue(cfg, "CriticalChance", 0.25); SafeModeChance = Lib.ConfigValue(cfg, "SafeModeChance", 0.5); IncentiveRedundancy = Lib.ConfigValue(cfg, "IncentiveRedundancy", false); // misc EnforceCoherency = Lib.ConfigValue(cfg, "EnforceCoherency", true); TrackingPivot = Lib.ConfigValue(cfg, "TrackingPivot", true); HeadLampsCost = Lib.ConfigValue(cfg, "HeadLampsCost", 0.002); DeathReputation = Lib.ConfigValue(cfg, "DeathReputation", 100.0f); BreakdownReputation = Lib.ConfigValue(cfg, "BreakdownReputation", 10.0f); StockMessages = Lib.ConfigValue(cfg, "StockMessages", false); MessageLength = Lib.ConfigValue(cfg, "MessageLength", 4.0f); LowQualityRendering = Lib.ConfigValue(cfg, "LowQualityRendering", false); }
public static void Parse() { var kerbalismConfigNodes = GameDatabase.Instance.GetConfigs("Kerbalism"); if (kerbalismConfigNodes.Length < 1) { return; } ConfigNode cfg = kerbalismConfigNodes[0].config; // profile used Profile = Lib.ConfigValue(cfg, "Profile", string.Empty); // user-defined features Reliability = Lib.ConfigValue(cfg, "Reliability", false); Deploy = Lib.ConfigValue(cfg, "Deploy", false); Science = Lib.ConfigValue(cfg, "Science", false); SpaceWeather = Lib.ConfigValue(cfg, "SpaceWeather", false); Automation = Lib.ConfigValue(cfg, "Automation", false); // pressure PressureFactor = Lib.ConfigValue(cfg, "PressureFactor", 10.0); PressureThreshold = Lib.ConfigValue(cfg, "PressureThreshold", 0.9); // poisoning PoisoningFactor = Lib.ConfigValue(cfg, "PoisoningFactor", 0.0); PoisoningThreshold = Lib.ConfigValue(cfg, "PoisoningThreshold", 0.02); // signal UnlinkedControl = Lib.ConfigEnum(cfg, "UnlinkedControl", UnlinkedCtrl.none); DataRateMinimumBitsPerSecond = Lib.ConfigValue(cfg, "DataRateMinimumBitsPerSecond", 1.0f); DataRateDampingExponent = Lib.ConfigValue(cfg, "DataRateDampingExponent", 6.0f); DataRateDampingExponentRT = Lib.ConfigValue(cfg, "DataRateDampingExponentRT", 6.0f); DataRateSurfaceExperiment = Lib.ConfigValue(cfg, "DataRateSurfaceExperiment", 0.3f); TransmitterActiveEcFactor = Lib.ConfigValue(cfg, "TransmitterActiveEcFactor", 1.5); TransmitterPassiveEcFactor = Lib.ConfigValue(cfg, "TransmitterPassiveEcFactor", 0.04); // science ScienceDialog = Lib.ConfigValue(cfg, "ScienceDialog", true); AsteroidSampleMassPerMB = Lib.ConfigValue(cfg, "AsteroidSampleMassPerMB", 0.00002); // reliability QualityScale = Lib.ConfigValue(cfg, "QualityScale", 4.0); // crew level LaboratoryCrewLevelBonus = Lib.ConfigValue(cfg, "LaboratoryCrewLevelBonus", 0.2); MaxLaborartoryBonus = Lib.ConfigValue(cfg, "MaxLaborartoryBonus", 2.0); HarvesterCrewLevelBonus = Lib.ConfigValue(cfg, "HarvesterCrewLevelBonus", 0.1); MaxHarvesterBonus = Lib.ConfigValue(cfg, "MaxHarvesterBonus", 2.0); // misc EnforceCoherency = Lib.ConfigValue(cfg, "EnforceCoherency", true); HeadLampsCost = Lib.ConfigValue(cfg, "HeadLampsCost", 0.002); LowQualityRendering = Lib.ConfigValue(cfg, "LowQualityRendering", false); UIScale = Lib.ConfigValue(cfg, "UIScale", 1.0f); UIPanelWidthScale = Lib.ConfigValue(cfg, "UIPanelWidthScale", 1.0f); KerbalDeathReputationPenalty = Lib.ConfigValue(cfg, "KerbalDeathReputationPenalty", 100.0f); KerbalBreakdownReputationPenalty = Lib.ConfigValue(cfg, "KerbalBreakdownReputationPenalty", 30f); // save game settings presets LifeSupportAtmoLoss = Lib.ConfigValue(cfg, "LifeSupportAtmoLoss", 50); LifeSupportSurvivalTemperature = Lib.ConfigValue(cfg, "LifeSupportSurvivalTemperature", 295); LifeSupportSurvivalRange = Lib.ConfigValue(cfg, "LifeSupportSurvivalRange", 5); ComfortLivingSpace = Lib.ConfigValue(cfg, "ComfortLivingSpace", 20); ComfortFirmGround = Lib.ConfigValue(cfg, "ComfortFirmGround", 0.1f); ComfortExercise = Lib.ConfigValue(cfg, "ComfortExercise", 0.2f); ComfortNotAlone = Lib.ConfigValue(cfg, "ComfortNotAlone", 0.3f); ComfortCallHome = Lib.ConfigValue(cfg, "ComfortCallHome", 0.2f); ComfortPanorama = Lib.ConfigValue(cfg, "ComfortPanorama", 0.1f); ComfortPlants = Lib.ConfigValue(cfg, "ComfortPlants", 0.1f); StormFrequency = Lib.ConfigValue(cfg, "StormFrequency", 0.4f); StormDurationHours = Lib.ConfigValue(cfg, "StormDurationHours", 2); StormEjectionSpeed = Lib.ConfigValue(cfg, "StormEjectionSpeed", 0.33f); ShieldingEfficiency = Lib.ConfigValue(cfg, "ShieldingEfficiency", 0.9f); StormRadiation = Lib.ConfigValue(cfg, "StormRadiation", 5.0f); ExternRadiation = Lib.ConfigValue(cfg, "ExternRadiation", 0.04f); RadiationInSievert = Lib.ConfigValue(cfg, "RadiationInSievert", false); ModsIncompatible = Lib.ConfigValue(cfg, "ModsIncompatible", MODS_INCOMPATIBLE); ModsWarning = Lib.ConfigValue(cfg, "ModsWarning", MODS_WARNING); ModsScience = Lib.ConfigValue(cfg, "ModsScience", MODS_SCIENCE); CheckForCRP = Lib.ConfigValue(cfg, "CheckForCRP", true); UseSamplingSunFactor = Lib.ConfigValue(cfg, "UseSamplingSunFactor", false); // debug / logging VolumeAndSurfaceLogging = Lib.ConfigValue(cfg, "VolumeAndSurfaceLogging", false); loaded = true; }
public static void Parse() { var cfg = Lib.ParseConfig("KerbalismConfig/Kerbalism"); // profile used Profile = Lib.ConfigValue(cfg, "Profile", string.Empty); // user-defined features Reliability = Lib.ConfigValue(cfg, "Reliability", false); Deploy = Lib.ConfigValue(cfg, "Deploy", false); Science = Lib.ConfigValue(cfg, "Science", false); SpaceWeather = Lib.ConfigValue(cfg, "SpaceWeather", false); Automation = Lib.ConfigValue(cfg, "Automation", false); // pressure PressureFactor = Lib.ConfigValue(cfg, "PressureFactor", 10.0); PressureThreshold = Lib.ConfigValue(cfg, "PressureThreshold", 0.9); // poisoning PoisoningFactor = Lib.ConfigValue(cfg, "PoisoningFactor", 0.0); PoisoningThreshold = Lib.ConfigValue(cfg, "PoisoningThreshold", 0.02); // humidity HumidityFactor = Lib.ConfigValue(cfg, "HumidityFactor", 1.0); HumidityThreshold = Lib.ConfigValue(cfg, "HumidityThreshold", 0.95); // signal UnlinkedControl = Lib.ConfigEnum(cfg, "UnlinkedControl", UnlinkedCtrl.none); DataRateDampingExponent = Lib.ConfigValue(cfg, "DataRateDampingExponent", 6.0f); DataRateDampingExponentRT = Lib.ConfigValue(cfg, "DataRateDampingExponentRT", 6.0f); DataRateSurfaceExperiment = Lib.ConfigValue(cfg, "DataRateSurfaceExperiment", 0.3f); TransmitterActiveEcFactor = Lib.ConfigValue(cfg, "TransmitterActiveEcFactor", 1.5); TransmitterPassiveEcFactor = Lib.ConfigValue(cfg, "TransmitterPassiveEcFactor", 0.2); // science ScienceDialog = Lib.ConfigValue(cfg, "ScienceDialog", true); // reliability QualityScale = Lib.ConfigValue(cfg, "QualityScale", 4.0); // crew level LaboratoryCrewLevelBonus = Lib.ConfigValue(cfg, "LaboratoryCrewLevelBonus", 0.2); MaxLaborartoryBonus = Lib.ConfigValue(cfg, "MaxLaborartoryBonus", 2.0); HarvesterCrewLevelBonus = Lib.ConfigValue(cfg, "HarvesterCrewLevelBonus", 0.1); MaxHarvesterBonus = Lib.ConfigValue(cfg, "MaxHarvesterBonus", 2.0); // misc EnforceCoherency = Lib.ConfigValue(cfg, "EnforceCoherency", true); TrackingPivot = Lib.ConfigValue(cfg, "TrackingPivot", true); HeadLampsCost = Lib.ConfigValue(cfg, "HeadLampsCost", 0.002); LowQualityRendering = Lib.ConfigValue(cfg, "LowQualityRendering", false); UIScale = Lib.ConfigValue(cfg, "UIScale", 1.0f); UIPanelWidthScale = Lib.ConfigValue(cfg, "UIPanelWidthScale", 1.0f); // save game settings presets LifeSupportAtmoLoss = Lib.ConfigValue(cfg, "LifeSupportAtmoLoss", 50); LifeSupportSurvivalTemperature = Lib.ConfigValue(cfg, "LifeSupportSurvivalTemperature", 295); LifeSupportSurvivalRange = Lib.ConfigValue(cfg, "LifeSupportSurvivalRange", 5); ComfortLivingSpace = Lib.ConfigValue(cfg, "ComfortLivingSpace", 20); ComfortFirmGround = Lib.ConfigValue(cfg, "ComfortFirmGround", 0.4f); ComfortExercise = Lib.ConfigValue(cfg, "ComfortExercise", 0.2f); ComfortNotAlone = Lib.ConfigValue(cfg, "ComfortNotAlone", 0.2f); ComfortCallHome = Lib.ConfigValue(cfg, "ComfortCallHome", 0.1f); ComfortPanorama = Lib.ConfigValue(cfg, "ComfortPanorama", 0.1f); ComfortPlants = Lib.ConfigValue(cfg, "ComfortPlants", 0.1f); StormMinDays = Lib.ConfigValue(cfg, "StormMinDays", 100); StormMaxDays = Lib.ConfigValue(cfg, "StormMaxDays", 500); StormDurationHours = Lib.ConfigValue(cfg, "StormDurationHours", 6); StormEjectionSpeed = Lib.ConfigValue(cfg, "StormEjectionSpeed", 0.33f); ShieldingEfficiency = Lib.ConfigValue(cfg, "ShieldingEfficiency", 0.9f); StormRadiation = Lib.ConfigValue(cfg, "StormRadiation", 5.0f); ExternRadiation = Lib.ConfigValue(cfg, "ExternRadiation", 0.04f); }