1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

added sufficient debug to diagnose - problem is with lack of original data

This commit is contained in:
Henning Koehler
2017-08-24 00:15:33 +12:00
parent d8648288f0
commit 64e2db6a0f
5 changed files with 39 additions and 8 deletions

View File

@@ -204,7 +204,12 @@ void CIdentifierStorage::registerObject(std::string scope, std::string type, std
std::string fullID = type + '.' + name;
checkIdentifier(fullID);
registeredObjects.insert(std::make_pair(fullID, data));
auto mapping = std::make_pair(fullID, data);
if(!registeredObjects.contains(mapping))
{
CLogger::getLogger(CLoggerDomain("identifier"))->traceStream() << "registered " << fullID << " as " << scope << ":" << identifier;
registeredObjects.insert(mapping);
}
}
std::vector<CIdentifierStorage::ObjectData> CIdentifierStorage::getPossibleIdentifiers(const ObjectCallback & request)
@@ -393,8 +398,9 @@ bool CContentHandler::ContentTypeHandler::loadMod(std::string modName, bool vali
continue;
}
logGlobal->debugStream() << "no original data in loadMod(" << name << "): " << data;
}
// normal new object or one with index bigger that data size
// normal new object or one with index bigger than data size
performValidate(data,name);
handler->loadObject(modName, name, data);
}