1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

NKAI: cancel checking building which needs itself as prerequisite

This commit is contained in:
Andrii Danylchenko 2023-09-10 11:44:28 +03:00 committed by Andrii Danylchenko
parent 2d6ef9049a
commit a005829a57

View File

@ -256,7 +256,7 @@ BuildingInfo BuildAnalyzer::getBuildingOrPrerequisite(
{
logAi->trace("cant build. Need other dwelling");
}
else
else if(missingBuildings[0] != toBuild)
{
logAi->trace("cant build. Need %d", missingBuildings[0].num);
@ -274,6 +274,12 @@ BuildingInfo BuildAnalyzer::getBuildingOrPrerequisite(
return prerequisite;
}
else
{
logAi->trace("Cant build. The building requires itself as prerequisite");
return info;
}
}
}
else