diff API/Objects/Requirement/AbstractUnitRequirement.cs @ 458:680db2462e34

Re #379: * Move GetObjectCountFromArmy(Army, OBJECT_TYPE) to top level and implement * Fix army validation for appropriate "NA" returns * Make basic "Requires..." requirements abstract so that we always need to make specific versions (e.g. UnitRequires... that knows how to check amount of units)
author IBBoard <dev@ibboard.co.uk>
date Sun, 26 Feb 2012 20:16:33 +0000
parents 8e01c3174cc3
children 159dc9be36c2
line wrap: on
line diff
--- a/API/Objects/Requirement/AbstractUnitRequirement.cs	Sun Feb 26 15:14:01 2012 +0000
+++ b/API/Objects/Requirement/AbstractUnitRequirement.cs	Sun Feb 26 20:16:33 2012 +0000
@@ -153,6 +153,8 @@
 
 		protected abstract int GetObjectCountFromArmy(Army toArmy);
 
+		protected abstract int GetObjectCountFromArmy(Army toArmy, OBJECT_TYPE obj);
+
 		protected virtual int GetObjectCountFromObject(IWarFoundryObject wfObject)
 		{
 			return allowedObject.Equals(wfObject) ? 1 : 0;