1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-02-03 13:01:33 +02:00

Restored neutral faction ID, changed warnings related to H3 ID's

This commit is contained in:
Ivan Savenko 2022-12-19 12:22:02 +02:00 committed by Nordsoft91
parent 01e8a83c56
commit 3cf1e3b4d4
2 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@
"neutral" :
{
"name" : "Neutral",
"index" : 9,
"alignment" : "neutral",
"creatureBackground" :
{

View File

@ -404,6 +404,9 @@ bool ContentTypeHandler::loadMod(std::string modName, bool validate)
if (vstd::contains(data.Struct(), "index") && !data["index"].isNull())
{
if (modName != "core")
logMod->warn("Mod %s is attempting to load original data! This should be reserved for built-in mod.", modName);
// try to add H3 object data
size_t index = static_cast<size_t>(data["index"].Float());
@ -416,7 +419,7 @@ bool ContentTypeHandler::loadMod(std::string modName, bool validate)
}
else
{
logMod->warn("no original data in loadMod(%s) at index %d", name, index);
logMod->trace("no original data in loadMod(%s) at index %d", name, index);
}
performValidate(data, name);
handler->loadObject(modName, name, data, index);