Simplify special exits of several acitivities.

This commit is contained in:
tovl
2019-06-30 20:53:36 +02:00
committed by teinarss
parent 3790169db9
commit 985020b4ad
9 changed files with 20 additions and 45 deletions

View File

@@ -1012,7 +1012,7 @@ namespace OpenRA.Mods.Common.Traits
// them to land on a resupplier. For aircraft without it, it makes more sense to land than to idle above a
// free resupplier.
var forceLand = orderString == "ForceEnter" || !Info.TakeOffOnResupply;
self.QueueActivity(order.Queued, new ReturnToBase(self, Info.AbortOnResupply, targetActor, forceLand));
self.QueueActivity(order.Queued, new ReturnToBase(self, targetActor, forceLand));
}
else if (orderString == "Stop")
{
@@ -1036,7 +1036,7 @@ namespace OpenRA.Mods.Common.Traits
// Aircraft with TakeOffOnResupply would immediately take off again, so there's no point in forcing them to land
// on a resupplier. For aircraft without it, it makes more sense to land than to idle above a free resupplier.
self.QueueActivity(order.Queued, new ReturnToBase(self, Info.AbortOnResupply, null, !Info.TakeOffOnResupply));
self.QueueActivity(order.Queued, new ReturnToBase(self, null, !Info.TakeOffOnResupply));
}
else if (orderString == "Scatter")
Nudge(self);

View File

@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
var resupplier = ReturnToBase.ChooseResupplier(self, true);
if (resupplier != null)
self.QueueActivity(new ReturnToBase(self, aircraftInfo.AbortOnResupply, resupplier));
self.QueueActivity(new ReturnToBase(self, resupplier));
else
{
// nowhere to land, pick something friendly and circle over it.