Expose Plane turn-to-attack delay to yaml.

Require Plane in some ctors.
This commit is contained in:
Taryn Hill
2015-04-01 00:12:20 -05:00
parent c0c7ad1035
commit 02da41e5c5
13 changed files with 60 additions and 45 deletions

View File

@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.Traits
var airfield = ReturnToBase.ChooseAirfield(self, true);
if (airfield != null)
{
self.QueueActivity(new ReturnToBase(self, airfield));
self.QueueActivity(new ReturnToBase(self, airfield, self.Trait<Plane>()));
self.QueueActivity(new ResupplyAircraft(self));
}
else
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Traits
return;
}
self.QueueActivity(new Fly(self, Target.FromActor(someBuilding)));
self.QueueActivity(new Fly(self, Target.FromActor(someBuilding), self.Trait<Plane>()));
self.QueueActivity(new FlyCircle(self));
}
}