internal static void ValidationRulesCheck(MechDef mechDef, ref Dictionary <MechValidationType, List <string> > errorMessages) { var calculator = new ArmorWeightSavingCalculator(mechDef); if (calculator.ErrorMessage != null) { errorMessages[MechValidationType.InvalidInventorySlots].Add(calculator.ErrorMessage); } }
internal static void AdjustTooltip(TooltipPrefab_Equipment tooltip, MechLabPanel panel, MechComponentDef mechComponentDef) { if (!mechComponentDef.IsArmor()) { return; } var calculator = new ArmorWeightSavingCalculator(panel.activeMechDef); var tonnage = calculator.WeightSavings; tooltip.bonusesText.text = string.Format("- {0} ton, {1} / {2}", tonnage, calculator.Count, calculator.RequiredCount); }
internal static float WeightSavings(MechDef mechDef) { var calculator = new ArmorWeightSavingCalculator(mechDef); return(calculator.WeightSavings); }