Mercurial > repos > snowblizz-super-API-ideas
comparison api/Requirements/UnitRequirementMinNumber.cs @ 229:6083010a005c
Re #223: Use translations within the API
* Update requirements to use translations
* Remove duplicate classes
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 21 Dec 2009 20:37:35 +0000 |
parents | 2f3cafb69799 |
children |
comparison
equal
deleted
inserted
replaced
228:ece26f6a62f3 | 229:6083010a005c |
---|---|
1 // This file (UnitRequirementMinNumber.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2008, 2009 IBBoard. | 1 // This file (UnitRequirementMinNumber.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2008, 2009 IBBoard. |
2 // | 2 // |
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. | 3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. |
4 | 4 |
5 using System; | 5 using System; |
6 using IBBoard.Lang; | |
6 using IBBoard.WarFoundry.API.Objects; | 7 using IBBoard.WarFoundry.API.Objects; |
7 | 8 |
8 namespace IBBoard.WarFoundry.API.Requirements | 9 namespace IBBoard.WarFoundry.API.Requirements |
9 { | 10 { |
10 public class UnitRequirementMinNumber : UnitRequirement | 11 public class UnitRequirementMinNumber : UnitRequirement |
16 minUnitCount = minNumber; | 17 minUnitCount = minNumber; |
17 } | 18 } |
18 | 19 |
19 public override string Description | 20 public override string Description |
20 { | 21 { |
21 get { return "You must include at least "+minUnitCount+" "+unitType.Name+" units in an army"; } | 22 get { return Translation.GetTranslation("requirementUnitMinNumber", "you must include at least {0} of {1} in an army", minUnitCount, unitType.Name); } |
22 } | 23 } |
23 | 24 |
24 protected override AbstractFailedRequirement CanAddToArmy(Army army, UnitType type) | 25 protected override AbstractFailedRequirement CanAddToArmy(Army army, UnitType type) |
25 { | 26 { |
26 return null; | 27 return null; |