diff API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs @ 461:f0594621e4a0

Re #379: Fix validation of requirements to check for unit * Move "Is applicable" checks up to abstract "no more than N of unit type" class
author IBBoard <dev@ibboard.co.uk>
date Mon, 05 Mar 2012 19:52:54 +0000
parents 680db2462e34
children f48c49b53738
line wrap: on
line diff
--- a/API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs	Sun Mar 04 21:13:52 2012 +0000
+++ b/API/Objects/Requirement/UnitRequiresNoMoreThanNOfUnitTypeRequirement.cs	Mon Mar 05 19:52:54 2012 +0000
@@ -17,26 +17,9 @@
 			//Do nothing special
 		}
 
-		/// <summary>
-		/// Checks whether the supplied WarFoundryObject can be added to the supplied army.
-		/// </summary>
-		/// <returns>
-		/// A <code>Validation</code> enum to show the result of the validation
-		/// </returns>
-		/// <param name='wfObject'>
-		/// The object that we want to add. This may be involved in the check, or it may not affect the evaluation of the requirement
-		/// </param>
-		/// <param name='toArmy'>
-		/// The army to add the object to.
-		/// </param>
-		public override Validation AllowsAdding(IWarFoundryObject wfObject, Army toArmy)
-		{
-			return IsApplicable(wfObject, toArmy) ? base.AllowsAdding(wfObject, toArmy) : Validation.NotApplicable;
-		}
-
 		protected override bool IsApplicable(IWarFoundryObject toObject, Army toArmy)
 		{
-			return IsApplicable(toObject) || IsApplicableForRequiredType(toObject, toArmy);
+			return base.IsApplicable(toObject, toArmy) || IsApplicableForRequiredType(toObject, toArmy);
 		}
 
 		protected override bool IsApplicable(IWarFoundryObject toObject)