view api/Requirements/UnitMaxNumberReached.cs @ 0:520818033bb6

Initial commit of WarFoundry code
author IBBoard <dev@ibboard.co.uk>
date Fri, 19 Dec 2008 15:57:51 +0000
parents
children 306558904c2a
line wrap: on
line source

using System;
using IBBoard;
using IBBoard.Lang;
using IBBoard.WarFoundry.API.Objects;

namespace IBBoard.WarFoundry.API.Requirements
{
	/// <summary>
	/// Summary description for UnitMaxNumberRequirement.
	/// </summary>
	public class UnitMaxNumberReached : FailedUnitRequirement
	{
		private UnitType type;

		public UnitMaxNumberReached(UnitType unitType, UnitRequirementMaxNumber requirement) : base(requirement)
		{
			type = unitType;
		}

		public override string Description
		{
			get { return String.Format(Translation.GetTranslation("ErrorUnitMaxNumberReached", "The maximum number of units of type \"{0}\" has already been reached or exceeded."), type.Name); }
		}
	}
}