diff --git a/OpenRA.Mods.Common/AI/BaseBuilder.cs b/OpenRA.Mods.Common/AI/BaseBuilder.cs index 2263d20f97..46a102c75d 100644 --- a/OpenRA.Mods.Common/AI/BaseBuilder.cs +++ b/OpenRA.Mods.Common/AI/BaseBuilder.cs @@ -187,7 +187,7 @@ namespace OpenRA.Mods.Common.AI { HashSet actors; if (!ai.Info.BuildingCommonNames.TryGetValue(commonName, out actors)) - throw new InvalidOperationException("Can't find {0} in the HackyAI BuildingCommonNames definition.".F(commonName)); + return null; var available = buildables.Where(actor => { diff --git a/OpenRA.Mods.Common/AI/HackyAI.cs b/OpenRA.Mods.Common/AI/HackyAI.cs index a3c9e7148a..ca15330896 100644 --- a/OpenRA.Mods.Common/AI/HackyAI.cs +++ b/OpenRA.Mods.Common/AI/HackyAI.cs @@ -126,10 +126,11 @@ namespace OpenRA.Mods.Common.AI [Desc("What buildings to the AI should build.", "What % of the total base must be this type of building.")] public readonly Dictionary BuildingFractions = null; - [Desc("Tells the AI what unit types fall under the same common name.")] + [Desc("Tells the AI what unit types fall under the same common name. Only supported entry is Mcv.")] public readonly Dictionary> UnitsCommonNames = null; - [Desc("Tells the AI what building types fall under the same common name.")] + [Desc("Tells the AI what building types fall under the same common name.", + "Possible keys are ConstructionYard, Power, Refinery, Silo , Barracks, Production, VehiclesFactory, NavalProduction.")] public readonly Dictionary> BuildingCommonNames = null; [Desc("What buildings should the AI have a maximum limit to build.")]