mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +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");
|
logAi->trace("cant build. Need other dwelling");
|
||||||
}
|
}
|
||||||
else
|
else if(missingBuildings[0] != toBuild)
|
||||||
{
|
{
|
||||||
logAi->trace("cant build. Need %d", missingBuildings[0].num);
|
logAi->trace("cant build. Need %d", missingBuildings[0].num);
|
||||||
|
|
||||||
@ -274,6 +274,12 @@ BuildingInfo BuildAnalyzer::getBuildingOrPrerequisite(
|
|||||||
|
|
||||||
return prerequisite;
|
return prerequisite;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logAi->trace("Cant build. The building requires itself as prerequisite");
|
||||||
|
|
||||||
|
return info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user