diff API/Commands/SetUnitEquipmentRatioAmountCommand.cs @ 431:c8002429ab45

Re #366: Rewrite equipment handling and limits * Remove code added for #356 and work without limiting * Move "Calculate number taken" method to util class
author IBBoard <dev@ibboard.co.uk>
date Sat, 12 Nov 2011 20:35:15 +0000
parents 3c4a6403a88c
children
line wrap: on
line diff
--- a/API/Commands/SetUnitEquipmentRatioAmountCommand.cs	Sun Nov 06 20:44:53 2011 +0000
+++ b/API/Commands/SetUnitEquipmentRatioAmountCommand.cs	Sat Nov 12 20:35:15 2011 +0000
@@ -6,6 +6,7 @@
 using IBBoard.Commands;
 using IBBoard.Lang;
 using IBBoard.WarFoundry.API.Objects;
+using IBBoard.WarFoundry.API.Util;
 
 namespace IBBoard.WarFoundry.API.Commands
 {
@@ -21,9 +22,9 @@
 			newAmount = amount;
 		}
 
-		protected override string GetNewAmountString ()
+		protected override string GetNewAmountString()
 		{
-			return GetRatioAmountString(newAmount, UnitEquipmentRatioSelection.CalculateNumberTaken(Unit, EquipItem, newAmount));
+			return GetRatioAmountString(newAmount, UnitEquipmentUtil.CalculateEquipmentAmountTakenFromRatio(Unit, EquipItem, newAmount));
 		}
 
 		public override void Redo()