Implementation of the automated D2k Carryall

Closes #2246
This commit is contained in:
Matthijs Benschop
2014-11-20 16:14:29 +01:00
parent 71a8815ffb
commit 2d380c64bd
22 changed files with 681 additions and 21 deletions

View File

@@ -9,6 +9,7 @@
#endregion
using System.Drawing;
using OpenRA.Mods.Common;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities
@@ -55,7 +56,14 @@ namespace OpenRA.Mods.RA.Activities
self.SetTargetLine(Target.FromActor(proc), Color.Green, false);
if (self.Location != proc.Location + iao.DeliverOffset)
{
var notify = self.TraitsImplementing<INotifyHarvesterAction>();
var next = new DeliverResources();
foreach (var n in notify)
n.MovingToRefinery(self, proc.Location + iao.DeliverOffset, next);
return Util.SequenceActivities(movement.MoveTo(proc.Location + iao.DeliverOffset, 0), this);
}
if (!isDocking)
{