Remove civ code hardcoding from SkirmishReplacer component. Refs #1198.

This was SVN commit r13947.
This commit is contained in:
leper 2013-10-05 17:54:41 +00:00
parent 3624c591bd
commit fecfda29f6

View File

@ -1,19 +1,17 @@
const civList = ["general", "athen", "brit", "cart", "celt", "gaul", "hele", "iber", "mace", "maur", "pers", "rome", "spart"];
function SkirmishReplacer() {}
SkirmishReplacer.prototype.Schema = "";
for each (var civ in civList)
SkirmishReplacer.prototype.Schema +=
SkirmishReplacer.prototype.Schema =
"<optional>" +
"<element name='"+civ+"' a:help='Replacement template for this civ. If this element is not present, the \"general\" element (with {civ} replaced by the civ code) is taken. If this element is empty, or not defined, and also no general element, this entity is just deleted.'>" +
"<oneOrMore>" +
"<element a:help='Replacement template for the civ which this element is named after or general. If no element is defined for a civ the general element is used instead. If this element is empty the entity is just deleted. The general element gets used if no civ specific element is present and replaces {civ} with the civ code.'>" +
"<anyName/>" +
"<interleave>" +
"<text/>" +
"</interleave>" +
"</element>" +
"</oneOrMore>" +
"</optional>";
SkirmishReplacer.prototype.Init = function()
{
};