Remove ResupplyAircraft and AllowYieldingReservation
The few extra things those two activities did can be done in Resupply, making them redundant.
This commit is contained in:
@@ -595,7 +595,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var atLandAltitude = self.World.Map.DistanceAboveTerrain(CenterPosition) == Info.LandAltitude;
|
||||
|
||||
// Work-around to prevent players from accidentally canceling resupply by pressing 'Stop',
|
||||
// by re-queueing ResupplyAircraft as long as resupply hasn't finished and aircraft is still on resupplier.
|
||||
// by re-queueing Resupply as long as resupply hasn't finished and aircraft is still on resupplier.
|
||||
// TODO: Investigate moving this back to ResolveOrder's "Stop" handling,
|
||||
// once conflicts with other traits' "Stop" orders have been fixed.
|
||||
if (atLandAltitude)
|
||||
@@ -603,7 +603,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var host = GetActorBelow();
|
||||
if (host != null && (CanRearmAt(host) || CanRepairAt(host)))
|
||||
{
|
||||
self.QueueActivity(new ResupplyAircraft(self));
|
||||
self.QueueActivity(new Resupply(self, host, WDist.Zero));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,10 +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 ResupplyAircraft(self));
|
||||
}
|
||||
else
|
||||
{
|
||||
// nowhere to land, pick something friendly and circle over it.
|
||||
|
||||
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
|
||||
|
||||
var activity = a.CurrentActivity;
|
||||
var type = activity.GetType();
|
||||
if (type == typeof(Resupply) || type == typeof(ResupplyAircraft))
|
||||
if (type == typeof(Resupply))
|
||||
return true;
|
||||
|
||||
var next = activity.NextActivity;
|
||||
@@ -148,7 +148,7 @@ namespace OpenRA.Mods.Common.Traits.BotModules.Squads
|
||||
return false;
|
||||
|
||||
var nextType = next.GetType();
|
||||
if (nextType == typeof(Resupply) || nextType == typeof(ResupplyAircraft))
|
||||
if (nextType == typeof(Resupply))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user