Пример #1
0
        public void RecalculateUpgradedBuildRates()
        {
            UpVABRates.Clear();
            UpSPHRates.Clear();
            double rate  = 0.1;
            int    index = 0;

            while (rate > 0)
            {
                rate = KCT_MathParsing.ParseBuildRateFormula(KCT_BuildListVessel.ListType.VAB, index, this, true);
                if (rate >= 0)
                {
                    UpVABRates.Add(rate);
                }
                index++;
            }
            rate  = 0.1;
            index = 0;
            while (rate > 0)
            {
                rate = KCT_MathParsing.ParseBuildRateFormula(KCT_BuildListVessel.ListType.SPH, index, this, true);
                if (rate >= 0)
                {
                    UpSPHRates.Add(rate);
                }
                index++;
            }
        }
Пример #2
0
Файл: KSC.cs Проект: ntwest/KCT
        public void RecalculateUpgradedBuildRates()
        {
            const string logBlockName = nameof(SpaceCenterConstruction) + "." + nameof(RecalculateUpgradedBuildRates);

            using (EntryExitLogger.EntryExitLog(logBlockName, EntryExitLoggerOptions.All))
            {
                UpVABRates.Clear();
                UpSPHRates.Clear();
                double rate  = 0.1;
                int    index = 0;
                while (rate > 0)
                {
                    rate = KCT_MathParsing.ParseBuildRateFormula(BuildListVessel.ListType.VAB, index, this, true);
                    if (rate >= 0 && (index == 0 || VABRates[index - 1] > 0))
                    {
                        UpVABRates.Add(rate);
                    }
                    else
                    {
                        break;
                    }
                    index++;
                }
                rate  = 0.1;
                index = 0;
                while (rate > 0)
                {
                    rate = KCT_MathParsing.ParseBuildRateFormula(BuildListVessel.ListType.SPH, index, this, true);
                    if (rate >= 0 && (index == 0 || SPHRates[index - 1] > 0))
                    {
                        UpSPHRates.Add(rate);
                    }
                    else
                    {
                        break;
                    }
                    index++;
                }
            }
        }
Пример #3
0
        public void RecalculateUpgradedBuildRates()
        {
            UpVABRates.Clear();
            UpSPHRates.Clear();
            double rate  = 0.1;
            int    index = 0;

            while (rate > 0)
            {
                rate = MathParser.ParseBuildRateFormula(BuildListVessel.ListType.VAB, index, this, true);
                if (rate >= 0 && (index == 0 || VABRates[index - 1] > 0))
                {
                    UpVABRates.Add(rate);
                }
                else
                {
                    break;
                }
                index++;
            }
            rate  = 0.1;
            index = 0;
            while (rate > 0)
            {
                rate = MathParser.ParseBuildRateFormula(BuildListVessel.ListType.SPH, index, this, true);
                if (rate >= 0 && (index == 0 || SPHRates[index - 1] > 0))
                {
                    UpSPHRates.Add(rate);
                }
                else
                {
                    break;
                }
                index++;
            }
        }