1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Analyze json object modifications to detect mod conflicts

This commit is contained in:
Ivan Savenko
2024-10-02 18:58:03 +00:00
parent 2439d176a0
commit d0aba56a5e
3 changed files with 35 additions and 0 deletions

View File

@ -79,6 +79,9 @@ bool ContentTypeHandler::preloadModData(const std::string & modName, const std::
logMod->trace("Patching object %s (%s) from %s", objectName, remoteName, modName);
JsonNode & remoteConf = modData[remoteName].patches[objectName];
if (!remoteConf.isNull())
JsonUtils::detectConflicts(remoteConf, entry.second, objectName, "<root>");
JsonUtils::merge(remoteConf, entry.second);
}
}