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.
This commit is contained in:
Sean Hunt
2016-03-28 12:44:23 -04:00
parent 85c20e7adf
commit c18987e293

View File

@@ -302,7 +302,7 @@ namespace OpenRA.Mods.Common.Traits
{
yield return new EnterAlliedActorTargeter<IAcceptResourcesInfo>("Deliver", 5,
proc => IsAcceptableProcType(proc),
proc => !IsEmpty && proc.Trait<IAcceptResources>().AllowDocking);
proc => proc.Trait<IAcceptResources>().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);