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

Add missing check for file presence

This commit is contained in:
Ivan Savenko 2023-05-16 18:56:11 +03:00
parent 4f739d426d
commit 805721f8d7
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,7 @@
},
"graphics": {
"type":"string",
"format" : "imageFile",
"description": "BMP battleground resource"
},
"isSpecial": {

View File

@ -422,6 +422,9 @@ bool ContentTypeHandler::loadMod(const std::string & modName, bool validate)
const std::string & name = entry.first;
JsonNode & data = entry.second;
if (data.meta != modName)
logMod->warn("Mod %s is attempting to inject object %s into mod %s! This may not be supported in future versions!", data.meta, name, modName);
if (vstd::contains(data.Struct(), "index") && !data["index"].isNull())
{
if (modName != "core")