Don't check HasAdequateRefineryCount if no RefineryTypes defined.
This commit is contained in:
committed by
abcdefg30
parent
4cc5104fde
commit
43388cb7fc
@@ -266,7 +266,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
// Require at least one refinery, unless we can't build it.
|
// Require at least one refinery, unless we can't build it.
|
||||||
return AIUtils.CountBuildingByCommonName(Info.RefineryTypes, player) >= MinimumRefineryCount ||
|
return !Info.RefineryTypes.Any() ||
|
||||||
|
AIUtils.CountBuildingByCommonName(Info.RefineryTypes, player) >= MinimumRefineryCount ||
|
||||||
AIUtils.CountBuildingByCommonName(Info.PowerTypes, player) == 0 ||
|
AIUtils.CountBuildingByCommonName(Info.PowerTypes, player) == 0 ||
|
||||||
AIUtils.CountBuildingByCommonName(Info.ConstructionYardTypes, player) == 0;
|
AIUtils.CountBuildingByCommonName(Info.ConstructionYardTypes, player) == 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user