1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Serialize template

This commit is contained in:
nordsoft
2022-12-14 04:37:11 +04:00
parent 1e2abae62b
commit 53b2f68560
9 changed files with 189 additions and 58 deletions

View File

@@ -31,8 +31,9 @@ void CRmgTemplateStorage::loadObject(std::string scope, std::string name, const
{
JsonDeserializer handler(nullptr, data);
auto fullKey = normalizeIdentifier(scope, "core", name); //actually it's not used
templates[fullKey].setId(name);
templates[fullKey].setId(fullKey);
templates[fullKey].serializeJson(handler);
templates[fullKey].setName(name);
templates[fullKey].validate();
}
catch(const std::exception & e)