-
-
Save MustaphaTR/7290550da7b9a968c123859bcb1c3fa1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Doesn't work: | |
// If all valid weapons have depleted their ammo and Rearmable trait exists, return to RearmActor | |
if (rearmable != null && attackAircraft.Armaments.All(x => x.IsTraitPaused || !x.Weapon.IsValidAgainst(target, self.World, self))) | |
return new ReturnToBase(self, aircraft.Info.AbortOnResupply); | |
Works: | |
// If all valid weapons have depleted their ammo and Rearmable trait exists, return to RearmActor to reload and then resume the activity | |
if (rearmable != null && attackAircraft.Armaments.All(x => x.IsTraitPaused || !x.Weapon.IsValidAgainst(target, self.World, self))) | |
{ | |
self.QueueActivity(new ReturnToBase(self, aircraft.Info.AbortOnResupply)); | |
return NextActivity; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment