function Identity() {}
Identity.prototype.Schema =
"Specifies various names and values associated with the unit type, typically for GUI display to users." +
"" +
"hele" +
"Infantry Spearman" +
"Hoplite" +
"units/hele_infantry_spearman.png" +
"" +
"" +
"" +
"gaia" +
"cart" +
"celt" +
"hele" +
"iber" +
"pers" +
"rome" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"" +
"Basic" +
"Advanced" +
"Elite" +
"" +
"" +
"" +
"" +
"" +
"" +
"tokens" +
"" +
"" +
"" +
"" +
"Unit" +
"Infantry" +
"Cavalry" +
"Ranged" +
"Melee" +
"Mechanical" +
"Ship" +
"Siege" +
"Super" +
"Hero" +
"Support" +
"Animal" +
"Organic" +
"Structure" +
"Civic" +
"CivCentre" +
"Economic" +
"Defensive" +
"Village" +
"Town" +
"City" +
"ConquestCritical" +
"Worker" +
"CitizenSoldier" +
"Trade" +
"Warship" +
"SeaCreature" +
"ForestPlant" +
"Bow" + // TODO: what are these used for?
"Javelin" +
"Spear" +
"Sword" +
"" +
"" +
"
" +
"" +
"" +
"" +
"" +
"" +
"tokens" +
"" +
"" +
"" +
"" +
"Loose" +
"Box" +
"ColumnClosed" +
"LineClosed" +
"ColumnOpen" +
"LineOpen" +
"Flank" +
"Skirmish" +
"Wedge" +
"Testudo" +
"Phalanx" +
"Syntagma" +
"Formation12" +
"" +
"" +
"
" +
"" +
"" +
"" +
"" +
"" +
"" +
"";
Identity.prototype.Init = function()
{
};
Identity.prototype.Serialize = null; // we have no dynamic state to save
Identity.prototype.GetCiv = function()
{
return this.template.Civ;
};
Identity.prototype.GetRank = function()
{
return (this.template.Rank || "");
};
Identity.prototype.GetClassesList = function()
{
if (this.template.Classes && "_string" in this.template.Classes)
{
var string = this.template.Classes._string;
return string.split(/\s+/);
}
else
{
return [];
}
};
Identity.prototype.HasClass = function(name)
{
return this.GetClassesList().indexOf(name) != -1;
};
Identity.prototype.GetFormationsList = function()
{
if (this.template.Formations && "_string" in this.template.Formations)
{
var string = this.template.Formations._string;
return string.split(/\s+/);
}
else
{
return [];
}
};
Identity.prototype.CanUseFormation = function(name)
{
return this.GetFormationsList().indexOf(name) != -1;
};
Identity.prototype.GetSelectionGroupName = function()
{
return (this.template.SelectionGroupName || "");
}
Engine.RegisterComponentType(IID_Identity, "Identity", Identity);