From 43388cb7fcec120eda2d360bb55ac2135b49e663 Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Mon, 3 Aug 2020 10:47:43 +0300 Subject: [PATCH] Don't check HasAdequateRefineryCount if no RefineryTypes defined. --- OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs index f91fb36e5f..1772389d09 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs @@ -266,7 +266,8 @@ namespace OpenRA.Mods.Common.Traits get { // 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.ConstructionYardTypes, player) == 0; }