From 0edda0fb31df533a039b3d8b37222e56d962190d Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sun, 30 Oct 2011 16:45:44 +1300 Subject: [PATCH] make bot building repair controllable via yaml --- OpenRA.Mods.RA/AI/HackyAI.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/AI/HackyAI.cs b/OpenRA.Mods.RA/AI/HackyAI.cs index efb9920913..93df902f2c 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 AssignRolesInterval = 20; public readonly string RallypointTestBuilding = "fact"; // temporary hack to maintain previous rallypoint behavior. public readonly string[] UnitQueues = { "Vehicle", "Infantry", "Plane" }; + public readonly bool ShouldRepairBuildings = true; string IBotInfo.Name { get { return this.Name; } } @@ -441,7 +442,7 @@ namespace OpenRA.Mods.RA.AI { if (!enabled) return; - if (self.HasTrait()) + if (Info.ShouldRepairBuildings && self.HasTrait()) if (e.DamageState > DamageState.Light && e.PreviousDamageState <= DamageState.Light) { BotDebug("Bot noticed damage {0} {1}->{2}, repairing.",