diff api/Objects/UnitEquipmentItem.cs @ 265:6fe0cb1bf74f

Re #279: Create composite limit * Change uses of "AbstractLimit" to "ILimit" as composites don't have a number themselves and can't extend AbstractLimit * Refactor limit parsing code out into a separate class * Use grouping to allow for re-use of limit types in schema * Add min and max composite limits in schema
author IBBoard <dev@ibboard.co.uk>
date Sat, 05 Jun 2010 15:36:04 +0000
parents 7933d852181e
children 25c47b7ecc99
line wrap: on
line diff
--- a/api/Objects/UnitEquipmentItem.cs	Sat Jun 05 14:00:28 2010 +0000
+++ b/api/Objects/UnitEquipmentItem.cs	Sat Jun 05 15:36:04 2010 +0000
@@ -22,8 +22,8 @@
 		private string[] mutexGroups;
 		private UnitType unitType;
 		private string slotName = "";
-		private AbstractLimit minLimit;
-		private AbstractLimit maxLimit;
+		private ILimit minLimit;
+		private ILimit maxLimit;
 
 		public UnitEquipmentItem(EquipmentItem equipmentItem, UnitType equipmentFor)
 			: this(equipmentItem, equipmentFor, new string[0])
@@ -131,11 +131,11 @@
 		/// <summary>
 		/// Gets the Limit object for the minimum number of items that can be taken
 		/// </summary>
-		public AbstractLimit MinLimit
+		public ILimit MinLimit
 		{
 			get
 			{
-				AbstractLimit limit = minLimit;
+				ILimit limit = minLimit;
 				
 				if (limit == null)
 				{
@@ -163,11 +163,11 @@
 		/// <summary>
 		/// Gets the Limit object for the maximum number of items that can be taken
 		/// </summary>
-		public AbstractLimit MaxLimit
+		public ILimit MaxLimit
 		{
 			get
 			{
-				AbstractLimit limit = maxLimit;
+				ILimit limit = maxLimit;
 				
 				if (limit == null)
 				{