From 58cae272c6fcb14b85d6ff126bc1898f35e6c80b Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sun, 30 Oct 2011 14:50:42 +1300 Subject: [PATCH] push unit queues for HackyAI out to yaml --- OpenRA.Mods.RA/AI/HackyAI.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index 7f7f04d58b..6f802c52a2 100644 --- a/OpenRA.Mods.RA/AI/HackyAI.cs +++ b/OpenRA.Mods.RA/AI/HackyAI.cs @@ -35,6 +35,7 @@ namespace OpenRA.Mods.RA.AI public readonly int SquadSize = 8; public readonly int AssignRolesInterval = 20; public readonly string RallypointTestBuilding = "fact"; // temporary hack to maintain previous rallypoint behavior. + public readonly string[] UnitQueues = { "Vehicle", "Infantry", "Plane" }; string IBotInfo.Name { get { return this.Name; } } @@ -185,14 +186,8 @@ namespace OpenRA.Mods.RA.AI } if (ticks % feedbackTime == 0) - { - //about once every second, perform unintelligent cleanup tasks. - //e.g. ClearAreaAroundSpawnPoints(); - //e.g. start repairing damaged buildings. - BuildRandom("Vehicle"); - BuildRandom("Infantry"); - BuildRandom("Plane"); - } + foreach (var q in Info.UnitQueues) + BuildRandom(q); AssignRolesToIdleUnits(self); SetRallyPointsForNewProductionBuildings(self);