Index: ps/trunk/binaries/data/mods/public/simulation/components/Identity.js
===================================================================
--- ps/trunk/binaries/data/mods/public/simulation/components/Identity.js (revision 11042)
+++ ps/trunk/binaries/data/mods/public/simulation/components/Identity.js (revision 11043)
@@ -1,208 +1,131 @@
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" +
- "Melee" +
- "Cavalry" +
- "Ranged" +
- "Mechanical" +
- "Ship" +
- "Siege" +
- "Champion" +
- "Hero" +
- "Elephant" +
- "Chariot" +
- "Mercenary" +
- "Spear" +
- "Sword" +
- "Bow" +
- "Javelin" +
- "Sling" +
- "Support" +
- "Animal" +
- "Organic" +
- "Structure" +
- "Civic" +
- "CivCentre" +
- "Economic" +
- "Defensive" +
- "Gates" +
- "Wall" +
- "BarterMarket" +
- "Village" +
- "Town" +
- "City" +
- "ConquestCritical" +
- "Worker" +
- "Female" +
- "Healer" +
- "Slave" +
- "CitizenSoldier" +
- "Trade" +
- "Warship" +
- "SeaCreature" +
- "ForestPlant" +
- "DropsiteFood" +
- "DropsiteWood" +
- "DropsiteStone" +
- "DropsiteMetal" +
- "" +
- "" +
- "
" +
+ "" +
"" +
"" +
"" +
- "" +
+ "" +
"" +
"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);