Merge pull request #10940 from pchote/drain-remaining-funds

Fix AI stalling after losing its conyard and ref.
This commit is contained in:
Matthias Mailänder
2016-03-21 19:50:06 +01:00

View File

@@ -429,9 +429,10 @@ namespace OpenRA.Mods.Common.AI
public bool HasAdequateProc()
{
// Require at least one refinery, unless we have no power (can't build it).
// Require at least one refinery, unless we can't build it.
return CountBuildingByCommonName(Info.BuildingCommonNames.Refinery, Player) > 0 ||
CountBuildingByCommonName(Info.BuildingCommonNames.Power, Player) == 0;
CountBuildingByCommonName(Info.BuildingCommonNames.Power, Player) == 0 ||
CountBuildingByCommonName(Info.BuildingCommonNames.ConstructionYard, Player) == 0;
}
public bool HasMinimumProc()