1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Merge pull request #5954 from kdmcser/building_id

display lack id building
This commit is contained in:
Ivan Savenko
2025-07-28 18:54:10 +03:00
committed by GitHub

View File

@@ -885,8 +885,12 @@ void CTownHandler::beforeValidate(JsonNode & object)
const auto & inheritBuilding = [this](const std::string & name, JsonNode & target)
{
if (buildingsLibrary.Struct().count(name) == 0)
if(buildingsLibrary.Struct().count(name) == 0)
{
if(!target.Struct().count("id"))
logMod->warn("Mod '%s': Town building '%s' lack ID.", target.getModScope(), name);
return;
}
JsonNode baseCopy(buildingsLibrary[name]);