Add AbortOnResupply property to cancel aircraft activities on resupply.
This commit is contained in:
@@ -82,7 +82,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
new Turn(self, initialFacing),
|
new Turn(self, initialFacing),
|
||||||
new HeliLand(self, false),
|
new HeliLand(self, false),
|
||||||
new ResupplyAircraft(self),
|
new ResupplyAircraft(self),
|
||||||
NextActivity);
|
!heli.Info.AbortOnResupply ? NextActivity : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ActivityUtils.SequenceActivities(
|
return ActivityUtils.SequenceActivities(
|
||||||
|
|||||||
@@ -149,7 +149,8 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
landingProcedures.Add(new ResupplyAircraft(self));
|
landingProcedures.Add(new ResupplyAircraft(self));
|
||||||
}
|
}
|
||||||
|
|
||||||
landingProcedures.Add(NextActivity);
|
if (!planeInfo.AbortOnResupply)
|
||||||
|
landingProcedures.Add(NextActivity);
|
||||||
|
|
||||||
return ActivityUtils.SequenceActivities(landingProcedures.ToArray());
|
return ActivityUtils.SequenceActivities(landingProcedures.ToArray());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Does this actor need to turn before landing?")]
|
[Desc("Does this actor need to turn before landing?")]
|
||||||
public readonly bool TurnToLand = false;
|
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;
|
public readonly WDist LandAltitude = WDist.Zero;
|
||||||
|
|
||||||
[Desc("How fast this actor ascends or descends when using horizontal take off/landing.")]
|
[Desc("How fast this actor ascends or descends when using horizontal take off/landing.")]
|
||||||
|
|||||||
Reference in New Issue
Block a user