mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
NKAI: cancel checking building which needs itself as prerequisite
This commit is contained in:
committed by
Andrii Danylchenko
parent
2d6ef9049a
commit
a005829a57
@@ -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
|
||||
|
Reference in New Issue
Block a user