Merge pull request #9328 from Mailaender/ai-common-names
Fixed BuildingCommonNames magic
This commit is contained in:
@@ -187,7 +187,7 @@ namespace OpenRA.Mods.Common.AI
|
|||||||
{
|
{
|
||||||
HashSet<string> actors;
|
HashSet<string> actors;
|
||||||
if (!ai.Info.BuildingCommonNames.TryGetValue(commonName, out 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 =>
|
var available = buildables.Where(actor =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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.")]
|
[Desc("What buildings to the AI should build.", "What % of the total base must be this type of building.")]
|
||||||
public readonly Dictionary<string, float> BuildingFractions = null;
|
public readonly Dictionary<string, float> 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<string, HashSet<string>> UnitsCommonNames = null;
|
public readonly Dictionary<string, HashSet<string>> 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<string, HashSet<string>> BuildingCommonNames = null;
|
public readonly Dictionary<string, HashSet<string>> BuildingCommonNames = null;
|
||||||
|
|
||||||
[Desc("What buildings should the AI have a maximum limit to build.")]
|
[Desc("What buildings should the AI have a maximum limit to build.")]
|
||||||
|
|||||||
Reference in New Issue
Block a user