From c18987e293e2fd3eb540e464a2360be5eb490b97 Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 28 Mar 2016 12:44:23 -0400 Subject: [PATCH] Allow empty harvesters to be ordered to refineries The primary reason is to fix OpenRA/ra2#161. Rather than make the harvester trait more complicated by making this behaviour configurable, this commit just applies to all harvesters. --- OpenRA.Mods.Common/Traits/Harvester.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Harvester.cs b/OpenRA.Mods.Common/Traits/Harvester.cs index 4f0c20d44f..184364c980 100644 --- a/OpenRA.Mods.Common/Traits/Harvester.cs +++ b/OpenRA.Mods.Common/Traits/Harvester.cs @@ -302,7 +302,7 @@ namespace OpenRA.Mods.Common.Traits { yield return new EnterAlliedActorTargeter("Deliver", 5, proc => IsAcceptableProcType(proc), - proc => !IsEmpty && proc.Trait().AllowDocking); + proc => proc.Trait().AllowDocking); yield return new HarvestOrderTargeter(); } } @@ -386,9 +386,6 @@ namespace OpenRA.Mods.Common.Traits if (order.TargetActor != OwnerLinkedProc) LinkProc(self, OwnerLinkedProc = order.TargetActor); - if (IsEmpty) - return; - idleSmart = true; self.SetTargetLine(Target.FromOrder(self.World, order), Color.Green);