Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff API/Objects/Requirement/UnitRequiresAtLeastNUnitsRequirement.cs @ 340:7bd2a7cdbfbd
Re #27: Unit requirements
* Update "Requires at least" requirements to use new enum
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 04 Apr 2011 19:06:01 +0000 |
parents | 4497ebce9a57 |
children | 008537acf244 |
line wrap: on
line diff
--- a/API/Objects/Requirement/UnitRequiresAtLeastNUnitsRequirement.cs Sun Apr 03 19:40:42 2011 +0000 +++ b/API/Objects/Requirement/UnitRequiresAtLeastNUnitsRequirement.cs Mon Apr 04 19:06:01 2011 +0000 @@ -23,7 +23,7 @@ /// Checks whether the supplied WarFoundryObject can be added to the supplied army. /// </summary> /// <returns> - /// <c>true</c> if the object can be added, else <c>false</c> + /// 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 @@ -31,9 +31,9 @@ /// <param name='toArmy'> /// The army to add the object to. /// </param> - public override bool AllowsAdding(WarFoundryObject wfObject, Army toArmy) + public override Validation AllowsAdding(WarFoundryObject wfObject, Army toArmy) { - return IsApplicable(wfObject, toArmy) ? base.ValidatesArmy(toArmy) : true; + return IsApplicable(wfObject, toArmy) ? base.ValidatesArmy(toArmy) : Validation.NotApplicable; } @@ -55,9 +55,9 @@ } - public override bool ValidatesArmy(Army toArmy) + public override Validation ValidatesArmy(Army toArmy) { - return IsApplicable(toArmy) ? base.ValidatesArmy(toArmy) : true; + return IsApplicable(toArmy) ? base.ValidatesArmy(toArmy) : Validation.NotApplicable; } } }