forked from mirrors/0ad
Allow other root XML than entity.
Implements a `GetOnlyChild()`, following discussion at https://irclogs.wildfiregames.com/%230ad-dev/2022-05-06-QuakeNet-%230ad-dev.log. Differential revision: https://code.wildfiregames.com/D4738 Comments by: @phosit, @Stan, @vladislavbelov, @wraitii This was SVN commit r27323.
This commit is contained in:
@@ -1148,7 +1148,8 @@ std::string CComponentManager::GenerateSchema() const
|
||||
std::sort(componentTypes.begin(), componentTypes.end());
|
||||
schema +=
|
||||
"<start>"
|
||||
"<element name='Entity'>"
|
||||
"<element>"
|
||||
"<anyName/>"
|
||||
"<optional><attribute name='parent'/></optional>";
|
||||
for (std::vector<std::string>::const_iterator it = componentTypes.begin(); it != componentTypes.end(); ++it)
|
||||
schema += "<optional><ref name='component." + *it + "'/></optional>";
|
||||
|
||||
Reference in New Issue
Block a user