0ad/binaries/data/mods/public/simulation/components/Identity.js
Ykkrosh 40688ec5df # Initial support for automatic validation of entity template XML.
Add RelaxNG schemas for all current components.
Add -dumpSchema command-line option to dump the combined entity schema.
Add a Perl script to validate entity templates against the schema.
See #413.

This was SVN commit r7452.
2010-04-09 19:02:39 +00:00

32 lines
622 B
JavaScript

function Identity() {}
Identity.prototype.Schema =
"<element name='Civ'>" +
"<text/>" + // TODO: <choice>?
"</element>" +
"<element name='GenericName'>" +
"<text/>" +
"</element>" +
"<optional>" +
"<element name='SpecificName'>" +
"<text/>" +
"</element>" +
"</optional>" +
"<element name='IconCell'>" +
"<data type='nonNegativeInteger'/>" +
"</element>" +
"<element name='IconSheet'>" +
"<text/>" +
"</element>";
Identity.prototype.Init = function()
{
};
Identity.prototype.GetCiv = function()
{
return this.template.Civ;
};
Engine.RegisterComponentType(IID_Identity, "Identity", Identity);