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

@@ -111,6 +111,12 @@ namespace OpenRA.Mods.RA.Activities
harv.LastOrderLocation = path[0];
self.SetTargetLine(Target.FromCell(self.World, path[0]), Color.Red, false);
var notify = self.TraitsImplementing<INotifyHarvesterAction>();
var next = new FindResources();
foreach (var n in notify)
n.MovingToResources(self, path[0], next);
return Util.SequenceActivities(mobile.MoveTo(path[0], 1), new HarvestResource(), new FindResources());
}
@@ -163,7 +169,7 @@ namespace OpenRA.Mods.RA.Activities
harv.AcceptResource(resource);
foreach (var t in self.TraitsImplementing<INotifyHarvest>())
foreach (var t in self.TraitsImplementing<INotifyHarvesterAction>())
t.Harvested(self, resource);
return Util.SequenceActivities(new Wait(harvInfo.LoadTicksPerBale), this);