#region Arthea License /*********************************************************************** * Arthea MUD by R. Jennings (2007) http://arthea.googlecode.com/ * * By using this code you comply with the Artistic and GPLv2 Licenses. * ***********************************************************************/ #endregion using Arthea.Affects; using Arthea.Connections.Players; using Arthea.Continents.Areas.Characters.Enums; using Arthea.Creation; using Arthea.Environment; using Arthea.Interfaces; namespace Arthea.Races { /// <summary> /// Implementation of a race. /// </summary> public abstract class Race : CustomEditType { #region [rgn] Fields (4) private AffectList affects; private string description; private string name; private Size size; #endregion [rgn] #region [rgn] Constructors (2) /// <summary> /// Initializes a new instance of the <see cref="Race"/> class. /// </summary> /// <param name="name">The name.</param> public Race(string name) { this.name = name; } /// <summary> /// Initializes a new instance of the <see cref="Race"/> class. /// </summary> public Race() { } #endregion [rgn] #region [rgn] Properties (4) /// <summary> /// Gets or sets the affects. /// </summary> /// <value>The affects.</value> public AffectList Affects { get { return affects; } set { affects = value; } } /// <summary> /// Gets or sets the description. /// </summary> /// <value>The description.</value> public string Description { get { return description; } set { description = value; } } /// <summary> /// Gets or sets the name. /// </summary> /// <value>The name.</value> public string Name { get { return name; } set { name = value; } } /// <summary> /// Gets or sets the size. /// </summary> /// <value>The size.</value> public Size Size { get { return size; } set { size = value; } } #endregion [rgn] #region CustomEditType Members /// <summary> /// Customs the edit. /// </summary> /// <param name="player">The player.</param> /// <param name="editer">The editer.</param> /// <param name="argument">The argument.</param> public virtual void CustomEdit(Player player, OlcField editer, String argument) { Race race = Lists.Races.FindName(argument); if (race == null) { player.WriteLine("No such race."); return; } editer.Set(race); player.WriteLine("Race set to {0}", race.Name); } #endregion } }