示例#1
0
        public static void Parse()
        {
            var cfg = Lib.ParseConfig(API.GetConfigLocation());

            // 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);
            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);
        }