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:
reaperrr
2019-04-22 20:12:21 +02:00
committed by Paul Chote
parent 4a06c66dbd
commit bc0d8ca015
9 changed files with 22 additions and 94 deletions

View File

@@ -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;
}
}

View File

@@ -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.