Merge Rearm and Repair into Resupply activity

Allows parallel rearming and repairing.
This commit is contained in:
reaperrr
2019-03-24 16:26:14 +01:00
committed by Paul Chote
parent 123b3f054f
commit ba4b5738d7
9 changed files with 109 additions and 169 deletions

View File

@@ -28,12 +28,8 @@ namespace OpenRA.Mods.Common.Activities
if (host == null)
return;
var resupplyActivities = aircraft.GetResupplyActivities(host).ToArray();
if (resupplyActivities.Any())
QueueChild(self, ActivityUtils.SequenceActivities(self, resupplyActivities));
QueueChild(self, new Resupply(self, host, WDist.Zero));
QueueChild(self, new AllowYieldingReservation(self));
if (aircraft.Info.TakeOffOnResupply)
QueueChild(self, new TakeOff(self, (a, b, c) => NextActivity == null && b.NextActivity == null));
}