Mercurial > repos > IBDev-IBBoard.WarFoundry.API
diff API/Objects/Requirement/RequirementHandler.cs @ 451:676f5ce04176
Re #379: Fix validation of requirements to check for unit
* Add method to Army to differentiate "all requirements" from "requirements relevant to adding a unit"
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 28 Jan 2012 16:57:59 +0000 |
parents | 506af4cbe3f5 |
children | 248df19652f9 |
line wrap: on
line diff
--- a/API/Objects/Requirement/RequirementHandler.cs Sun Jan 22 19:17:06 2012 +0000 +++ b/API/Objects/Requirement/RequirementHandler.cs Sat Jan 28 16:57:59 2012 +0000 @@ -50,7 +50,7 @@ Validation result = Validation.Passed; failureMessages = new List<string>(); - foreach (IRequirement requirement in army.GetRequirements()) + foreach (IRequirement requirement in army.GetAddingUnitRequirements(unitType)) { if (!Validates.AsOkay(requirement.AllowsAdding(unitType, army))) {