Introduce a new CarryableHarvester trait

This commit is contained in:
abcdefg30
2018-02-22 00:39:57 +01:00
committed by Paul Chote
parent 89e3b62f61
commit 7e20bdd7ea
8 changed files with 84 additions and 55 deletions

View File

@@ -65,8 +65,7 @@ namespace OpenRA.Mods.Common.Activities
self.SetTargetLine(Target.FromActor(proc), Color.Green, false);
if (self.Location != proc.Location + iao.DeliveryOffset)
{
var notify = self.TraitsImplementing<INotifyHarvesterAction>();
foreach (var n in notify)
foreach (var n in self.TraitsImplementing<INotifyHarvesterAction>())
n.MovingToRefinery(self, proc, this);
return ActivityUtils.SequenceActivities(movement.MoveTo(proc.Location + iao.DeliveryOffset, 0), this);