Rename SelfReloads to AutoReloads
This commit is contained in:
@@ -22,7 +22,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
readonly Aircraft aircraft;
|
||||
readonly AttackPlane attackPlane;
|
||||
|
||||
readonly bool selfReloads;
|
||||
readonly bool autoReloads;
|
||||
int ticksUntilTurn;
|
||||
|
||||
public FlyAttack(Actor self, Target target)
|
||||
@@ -31,7 +31,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
aircraft = self.Trait<Aircraft>();
|
||||
attackPlane = self.TraitOrDefault<AttackPlane>();
|
||||
ticksUntilTurn = attackPlane.AttackPlaneInfo.AttackTurnDelay;
|
||||
selfReloads = self.TraitsImplementing<AmmoPool>().All(p => p.SelfReloads);
|
||||
autoReloads = self.TraitsImplementing<AmmoPool>().All(p => p.AutoReloads);
|
||||
}
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
@@ -47,7 +47,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
return NextActivity;
|
||||
|
||||
// If all valid weapons have depleted their ammo and RearmBuilding is defined, return to RearmBuilding to reload and then resume the activity
|
||||
if (!selfReloads && aircraft.Info.RearmBuildings.Any() && attackPlane.Armaments.All(x => x.IsTraitPaused || !x.Weapon.IsValidAgainst(target, self.World, self)))
|
||||
if (!autoReloads && aircraft.Info.RearmBuildings.Any() && attackPlane.Armaments.All(x => x.IsTraitPaused || !x.Weapon.IsValidAgainst(target, self.World, self)))
|
||||
return ActivityUtils.SequenceActivities(new ReturnToBase(self, aircraft.Info.AbortOnResupply), this);
|
||||
|
||||
if (attackPlane != null)
|
||||
|
||||
Reference in New Issue
Block a user