Hack around the Lua API.

This commit is contained in:
Paul Chote
2016-09-26 17:48:25 +01:00
parent 3487d6bad5
commit 34b10dcb77
7 changed files with 18 additions and 14 deletions

View File

@@ -20,11 +20,13 @@ namespace OpenRA.Mods.Common.Activities
{
readonly Aircraft heli;
readonly bool alwaysLand;
readonly bool abortOnResupply;
public HeliReturnToBase(Actor self, bool alwaysLand = true)
public HeliReturnToBase(Actor self, bool abortOnResupply, bool alwaysLand = true)
{
heli = self.Trait<Aircraft>();
this.alwaysLand = alwaysLand;
this.abortOnResupply = abortOnResupply;
}
public Actor ChooseHelipad(Actor self)
@@ -82,7 +84,7 @@ namespace OpenRA.Mods.Common.Activities
new Turn(self, initialFacing),
new HeliLand(self, false),
new ResupplyAircraft(self),
!heli.Info.AbortOnResupply ? NextActivity : null);
!abortOnResupply ? NextActivity : null);
}
return ActivityUtils.SequenceActivities(