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:
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
|
||||
|
Loading…
Reference in New Issue
Block a user