Beispiel #1
0
        public static double GetStandardFormulaValue(string formulaName, Dictionary <string, string> variables)
        {
            KCT_Preset_Formula formulaSettings = PresetManager.Instance.ActivePreset.FormulaSettings;

            switch (formulaName)
            {
            case "Node": return(MathParsing.ParseMath("KCT_NODE", formulaSettings.NodeFormula, variables));

            case "UpgradeFunds": return(MathParsing.ParseMath("KCT_UPGRADE_FUNDS", formulaSettings.UpgradeFundsFormula, variables));

            case "UpgradesForScience": return(MathParsing.ParseMath("KCT_UPGRADES_FOR_SCIENCE", formulaSettings.UpgradesForScience, variables));

            case "Research": return(MathParsing.ParseMath("KCT_RESEARCH", formulaSettings.ResearchFormula, variables));

            case "EffectivePart": return(MathParsing.ParseMath("KCT_EFFECTIVE_PART", formulaSettings.EffectivePartFormula, variables));

            case "ProceduralPart": return(MathParsing.ParseMath("KCT_PROCEDURAL_PART", formulaSettings.ProceduralPartFormula, variables));

            case "BP": return(MathParsing.ParseMath("KCT_BP", formulaSettings.BPFormula, variables));

            case "KSCUpgrade": return(MathParsing.ParseMath("KCT_KSC_UPGRADE", formulaSettings.KSCUpgradeFormula, variables));

            case "Reconditioning": return(MathParsing.ParseMath("KCT_RECONDITIONING", formulaSettings.ReconditioningFormula, variables));

            case "BuildRate": return(MathParsing.ParseMath("KCT_BUILD_RATE", formulaSettings.BuildRateFormula, variables));

            case "UpgradeReset": return(MathParsing.ParseMath("KCT_UPGRADE_RESET", formulaSettings.UpgradeResetFormula, variables));

            case "InventorySales": return(MathParsing.ParseMath("KCT_INVENTORY_SALES", formulaSettings.InventorySaleFormula, variables));

            case "IntegrationTime": return(MathParsing.ParseMath("KCT_INTEGRATION_TIME", formulaSettings.IntegrationTimeFormula, variables));

            case "IntegrationCost": return(MathParsing.ParseMath("KCT_INTEGRATION_COST", formulaSettings.IntegrationCostFormula, variables));

            case "RolloutCost": return(MathParsing.ParseMath("KCT_ROLLOUT_COST", formulaSettings.RolloutCostFormula, variables));

            case "NewLaunchPadCost": return(MathParsing.ParseMath("KCT_NEW_LAUNCHPAD_COST", formulaSettings.NewLaunchPadCostFormula, variables));

            case "RushCost": return(MathParsing.ParseMath("KCT_RUSH_COST", formulaSettings.RushCostFormula, variables));

            case "AirlaunchCost": return(MathParsing.ParseMath("KCT_AIRLAUNCH_COST", formulaSettings.AirlaunchCostFormula, variables));

            case "AirlaunchTime": return(MathParsing.ParseMath("KCT_AIRLAUNCH_TIME", formulaSettings.AirlaunchTimeFormula, variables));

            case "EngineRefurb": return(MathParsing.ParseMath("KCT_ENGINE_REFURB", formulaSettings.EngineRefurbFormula, variables));

            default: return(0);
            }
        }