diff --git a/OpenRA.Mods.Common/AI/HackyAI.cs b/OpenRA.Mods.Common/AI/HackyAI.cs index 9338d9bb72..4c7ccbd820 100644 --- a/OpenRA.Mods.Common/AI/HackyAI.cs +++ b/OpenRA.Mods.Common/AI/HackyAI.cs @@ -1027,7 +1027,7 @@ namespace OpenRA.Mods.Common.AI // Valid target found, delay by a few ticks to avoid rescanning before power fires via order BotDebug("AI: {2} found new target location {0} for support power {1}.", attackLocation, sp.Info.OrderName, Player.PlayerName); waitingPowers[sp] += 10; - QueueOrder(new Order(sp.Info.OrderName, supportPowerMngr.Self, false) { TargetLocation = attackLocation.Value, SuppressVisualFeedback = true }); + QueueOrder(new Order(sp.Key, supportPowerMngr.Self, false) { TargetLocation = attackLocation.Value, SuppressVisualFeedback = true }); } } } diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs index 57ed983805..228a689d22 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs @@ -153,7 +153,8 @@ namespace OpenRA.Mods.Common.Traits public class SupportPowerInstance { readonly SupportPowerManager manager; - readonly string key; + + public readonly string Key; public List Instances; public int RemainingTime; @@ -170,7 +171,7 @@ namespace OpenRA.Mods.Common.Traits public SupportPowerInstance(string key, SupportPowerManager manager) { this.manager = manager; - this.key = key; + Key = key; } public void PrerequisitesAvailable(bool available) @@ -205,14 +206,14 @@ namespace OpenRA.Mods.Common.Traits --RemainingTime; if (!notifiedCharging) { - power.Charging(power.Self, key); + power.Charging(power.Self, Key); notifiedCharging = true; } if (RemainingTime == 0 && !notifiedReady) { - power.Charged(power.Self, key); + power.Charged(power.Self, Key); notifiedReady = true; } } @@ -227,7 +228,7 @@ namespace OpenRA.Mods.Common.Traits if (power == null) return; - power.SelectTarget(power.Self, key, manager); + power.SelectTarget(power.Self, Key, manager); } public void Activate(Order order)