diff --git a/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs b/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs index 2330f839b3..f91fb36e5f 100644 --- a/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs +++ b/OpenRA.Mods.Common/Traits/BotModules/BaseBuilderBotModule.cs @@ -67,6 +67,12 @@ namespace OpenRA.Mods.Common.Traits [Desc("Increase maintained excess power by ExcessPowerIncrement for every N base buildings.")] public readonly int ExcessPowerIncreaseThreshold = 1; + [Desc("Number of refineries to build before building a barracks.")] + public readonly int InititalMinimumRefineryCount = 1; + + [Desc("Number of refineries to build additionally after building a barracks.")] + public readonly int AdditionalMinimumRefineryCount = 1; + [Desc("Additional delay (in ticks) between structure production checks when there is no active production.", "StructureProductionRandomBonusDelay is added to this.")] public readonly int StructureProductionInactiveDelay = 125; @@ -270,9 +276,7 @@ namespace OpenRA.Mods.Common.Traits { get { - // Unless we have no barracks (higher priority), require a 2nd refinery. - // TODO: Possibly unhardcode this, at least the targeted minimum of 2 (the fallback can probably stay at 1). - return AIUtils.CountBuildingByCommonName(Info.BarracksTypes, player) > 0 ? 2 : 1; + return AIUtils.CountBuildingByCommonName(Info.BarracksTypes, player) > 0 ? Info.InititalMinimumRefineryCount + Info.AdditionalMinimumRefineryCount : Info.InititalMinimumRefineryCount; } }