diff API/Objects/Requirement/RequiresNUnitsForMObjectsRequirement.cs @ 479:f48c49b53738

Re #410: "N units per M models in parent" requirement * Add a "context" object that will hold the parent unit (or possibly other stuff) * Update all method signatures and calls
author IBBoard <dev@ibboard.co.uk>
date Wed, 23 May 2012 20:56:27 +0100
parents 750eed630c41
children e0641e0eb86c
line wrap: on
line diff
--- a/API/Objects/Requirement/RequiresNUnitsForMObjectsRequirement.cs	Wed May 23 20:37:23 2012 +0100
+++ b/API/Objects/Requirement/RequiresNUnitsForMObjectsRequirement.cs	Wed May 23 20:56:27 2012 +0100
@@ -64,7 +64,7 @@
 			return normalisedLimited >= 1 && normalisedAllowed <= normalisedLimited;
 		}
 
-		public override Validation AllowsAdding(IWarFoundryObject wfObject, Army toArmy)
+		protected override Validation CheckAllowsAdding(IWarFoundryObject wfObject, Army toArmy, AddingContext context)
 		{
 			Validation canAdd = Validation.NotApplicable;
 			UnitType addedUnitType = (wfObject is Unit) ? ((Unit)wfObject).UnitType : wfObject as UnitType;