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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user