Exemple #1
0
        public static int UpdateElConverter(UpgradeConstants u_constants, Part part, PartStats original_stats, PartUpgrades upgrades_to_apply)
        {
            var converter_list = PartStats.GetModuleElConverterList(part);

            if (converter_list == null)
            {
                return(0);
            }

            foreach (var converter in converter_list)
            {
                converter.Rate = u_constants.CalculateImprovementValue(original_stats.ELConverter, upgrades_to_apply.elConverter);
            }


#if false
            var el_converter = PartStats.GetModuleElConverter(part);
            if (el_converter)
            {
                el_converter.Rate = u_constants.CalculateImprovementValue(original_stats.ELConverter, upgrades_to_apply.elConverter);
            }
#endif

            return(0);
        }