diff --git a/OpenRA.Mods.Common/Activities/Resupply.cs b/OpenRA.Mods.Common/Activities/Resupply.cs index 2e6a8b7713..476768d004 100644 --- a/OpenRA.Mods.Common/Activities/Resupply.cs +++ b/OpenRA.Mods.Common/Activities/Resupply.cs @@ -113,15 +113,9 @@ namespace OpenRA.Mods.Common.Activities var delta = (self.CenterPosition - host.CenterPosition).LengthSquared; var transport = transportCallers.FirstOrDefault(t => t.MinimumDistance.LengthSquared < delta); if (transport != null) - { - QueueChild(new WaitForTransport(self, moveActivities)); - - // TODO: Make this compatible with RepairableNear transport.RequestTransport(self, targetCell); - } - else - QueueChild(moveActivities); + QueueChild(moveActivities); return false; } diff --git a/OpenRA.Mods.Common/Activities/WaitForTransport.cs b/OpenRA.Mods.Common/Activities/WaitForTransport.cs deleted file mode 100644 index 71114639f6..0000000000 --- a/OpenRA.Mods.Common/Activities/WaitForTransport.cs +++ /dev/null @@ -1,41 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2019 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation, either version 3 of - * the License, or (at your option) any later version. For more - * information, see COPYING. - */ -#endregion - -using OpenRA.Activities; -using OpenRA.Mods.Common.Traits; - -namespace OpenRA.Mods.Common.Activities -{ - public class WaitForTransport : Activity - { - readonly ICallForTransport transportable; - readonly Activity inner; - - public WaitForTransport(Actor self, Activity inner) - { - transportable = self.TraitOrDefault(); - this.inner = inner; - } - - protected override void OnFirstRun(Actor self) - { - QueueChild(inner); - } - - public override bool Tick(Actor self) - { - if (transportable != null) - transportable.MovementCancelled(self); - - return true; - } - } -} diff --git a/OpenRA.Mods.Common/Traits/Repairable.cs b/OpenRA.Mods.Common/Traits/Repairable.cs index d6efd4ae42..d697449d9e 100644 --- a/OpenRA.Mods.Common/Traits/Repairable.cs +++ b/OpenRA.Mods.Common/Traits/Repairable.cs @@ -122,11 +122,8 @@ namespace OpenRA.Mods.Common.Traits if (!CanRepairAt(order.Target.Actor) || (!CanRepair() && !CanRearm())) return; - if (!order.Queued) - self.CancelActivity(); - self.SetTargetLine(order.Target, Color.Green); - self.QueueActivity(new Resupply(self, order.Target.Actor, new WDist(512))); + self.QueueActivity(order.Queued, new Resupply(self, order.Target.Actor, new WDist(512))); } IEnumerable IObservesVariables.GetVariableObservers()