mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Fixed meta field handling in JsonUtils::inherit function, removed
workarounds
This commit is contained in:
@ -360,17 +360,9 @@ void CObjectClassesHandler::beforeValidate(JsonNode & object)
|
||||
{
|
||||
for (auto & entry : object["types"].Struct())
|
||||
{
|
||||
JsonNode base = object["base"];
|
||||
base.setMeta(entry.second.meta);
|
||||
|
||||
JsonUtils::inherit(entry.second, base);
|
||||
JsonUtils::inherit(entry.second, object["base"]);
|
||||
for (auto & templ : entry.second["templates"].Struct())
|
||||
{
|
||||
JsonNode subBase = entry.second["base"];
|
||||
subBase.setMeta(entry.second.meta);
|
||||
|
||||
JsonUtils::inherit(templ.second, subBase);
|
||||
}
|
||||
JsonUtils::inherit(templ.second, entry.second["base"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user