Add AbortOnResupply property to cancel aircraft activities on resupply.

This commit is contained in:
Paul Chote
2016-09-25 15:44:46 +01:00
parent 6eafaeecf6
commit ea65ac542e
3 changed files with 6 additions and 2 deletions

View File

@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Activities
new Turn(self, initialFacing),
new HeliLand(self, false),
new ResupplyAircraft(self),
NextActivity);
!heli.Info.AbortOnResupply ? NextActivity : null);
}
return ActivityUtils.SequenceActivities(

View File

@@ -149,6 +149,7 @@ namespace OpenRA.Mods.Common.Activities
landingProcedures.Add(new ResupplyAircraft(self));
}
if (!planeInfo.AbortOnResupply)
landingProcedures.Add(NextActivity);
return ActivityUtils.SequenceActivities(landingProcedures.ToArray());

View File

@@ -69,6 +69,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Does this actor need to turn before landing?")]
public readonly bool TurnToLand = false;
[Desc("Does this actor cancel its previous activity after resupplying?")]
public readonly bool AbortOnResupply = false;
public readonly WDist LandAltitude = WDist.Zero;
[Desc("How fast this actor ascends or descends when using horizontal take off/landing.")]