Tac.GlobalSettings.GlobalSettings C# (CSharp) Méthode

GlobalSettings() public méthode

public GlobalSettings ( )
        public GlobalSettings()
        {
            const int SECONDS_PER_MINUTE = 60;
            const int SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE;
            const int SECONDS_PER_KERBIN_DAY = 6 * SECONDS_PER_HOUR;

            MaxDeltaTime = SECONDS_PER_HOUR * 24; // max 24 hours (86,400 seconds) per physics update, or 2,160,000 seconds per second (for the default of 0.04 seconds per physics update)
            ElectricityMaxDeltaTime = 1; // max 1 second per physics update

            Food = "Food";
            Water = "Water";
            Oxygen = "Oxygen";
            Electricity = "ElectricCharge";
            CO2 = "CarbonDioxide";
            Waste = "Waste";
            WasteWater = "WasteWater";
            FoodId = PartResourceLibrary.Instance.GetDefinition(Food).id;
            WaterId = PartResourceLibrary.Instance.GetDefinition(Water).id;
            OxygenId = PartResourceLibrary.Instance.GetDefinition(Oxygen).id;
            ElectricityId = PartResourceLibrary.Instance.GetDefinition(Electricity).id;
            CO2Id = PartResourceLibrary.Instance.GetDefinition(CO2).id;
            WasteId = PartResourceLibrary.Instance.GetDefinition(Waste).id;
            WasteWaterId = PartResourceLibrary.Instance.GetDefinition(WasteWater).id;

            // Consumption rates in units per Earth second
            // See the TacResources.cfg for conversions between units and metric tons.
            // Defaults are scaled from NASA's numbers for Human consumption
            // For the math behind the numbers, see
            // https://docs.google.com/spreadsheet/ccc?key=0Aioc9ek3XAvwdGNsRlh3OVhlbTFBR3M4RW0zLUNTRFE&usp=sharing
            FoodConsumptionRate = 0.000016927083333;
            WaterConsumptionRate = 0.000011188078704;
            OxygenConsumptionRate = 0.001713537562385;
            CO2ProductionRate = 0.00148012889876;
            WasteProductionRate = 0.000001539351852;
            WasteWaterProductionRate = 0.000014247685185;

            BaseElectricityConsumptionRate = 0.02125; // 76.5 per hour or 1.275 per minute, about 75% of a stock probe core's consumption (1.7 per min)
            ElectricityConsumptionRate = 0.014166666666667; // 51 per hour or 0.85 per minute, about 50% of a stock probe core's consumption
            EvaElectricityConsumptionRate = 0.00425; // 91.8 per 6 hours (1 Kerbin day), 15.3 per hour, 15% of a probe core or 12% compared to in a pod

            // Amount of resources to load crewable parts with, in seconds
            EvaDefaultResourceAmount = 1.0 * SECONDS_PER_KERBIN_DAY; // 1 Kerbin day, 6 hours

            // Maximum amount of time in seconds that a Kerbal can go without the resource
            MaxTimeWithoutFood = 360.0 * SECONDS_PER_HOUR; // 360 hours, 60 Kerbin days, 15 Earth days
            MaxTimeWithoutWater = 36.0 * SECONDS_PER_HOUR; // 36 hours, 6 Kerbin days, 1.5 Earth days
            MaxTimeWithoutOxygen = 2.0 * SECONDS_PER_HOUR; // 2 hours
            MaxTimeWithoutElectricity = 2.0 * SECONDS_PER_HOUR; // 2 hours
        }