15
|
1 // This file (UnitMaxNumberReached.cs) is a part of the IBBoard.WarFoundry.API project and is copyright 2009 IBBoard.
|
|
2 //
|
|
3 // The file and the library/program it is in are licensed under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING.LGPL for more information and the full license.
|
|
4
|
0
|
5 using System;
|
|
6 using IBBoard;
|
|
7 using IBBoard.Lang;
|
|
8 using IBBoard.WarFoundry.API.Objects;
|
|
9
|
|
10 namespace IBBoard.WarFoundry.API.Requirements
|
|
11 {
|
|
12 /// <summary>
|
|
13 /// Summary description for UnitMaxNumberRequirement.
|
|
14 /// </summary>
|
|
15 public class UnitMaxNumberReached : FailedUnitRequirement
|
|
16 {
|
|
17 private UnitType type;
|
|
18
|
|
19 public UnitMaxNumberReached(UnitType unitType, UnitRequirementMaxNumber requirement) : base(requirement)
|
|
20 {
|
|
21 type = unitType;
|
|
22 }
|
|
23
|
|
24 public override string Description
|
|
25 {
|
|
26 get { return String.Format(Translation.GetTranslation("ErrorUnitMaxNumberReached", "The maximum number of units of type \"{0}\" has already been reached or exceeded."), type.Name); }
|
|
27 }
|
|
28 }
|
|
29 }
|