mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix cases where pilots were not returned.
https://github.com/dcs-liberation/dcs_liberation/issues/276
This commit is contained in:
@@ -257,6 +257,7 @@ class PackageBuilder:
|
||||
flights = list(self.package.flights)
|
||||
for flight in flights:
|
||||
self.global_inventory.return_from_flight(flight)
|
||||
flight.clear_roster()
|
||||
self.package.remove_flight(flight)
|
||||
|
||||
|
||||
|
||||
@@ -284,6 +284,9 @@ class Flight:
|
||||
def missing_pilots(self) -> int:
|
||||
return len([p for p in self.pilots if p is None])
|
||||
|
||||
def clear_roster(self) -> None:
|
||||
self.squadron.return_pilots([p for p in self.pilots if p is not None])
|
||||
|
||||
def __repr__(self):
|
||||
name = db.unit_type_name(self.unit_type)
|
||||
if self.custom_name:
|
||||
|
||||
Reference in New Issue
Block a user