mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix issue in migrator when package has no flights
Would cause an exception because `PackageWaypoints.create(p, c)` would call `package.departure_closest_to_target()` on its turn which raises a runtime exception if no flights are present. Makes total sense when you think about it... Fixes #66
This commit is contained in:
parent
0a3a56d4bc
commit
8b802a9cbc
@ -40,7 +40,7 @@ class Migrator:
|
||||
def _update_packagewaypoints(self) -> None:
|
||||
for c in self.game.coalitions:
|
||||
for p in c.ato.packages:
|
||||
if not hasattr(p.waypoints, "initial"):
|
||||
if p.flights and not hasattr(p.waypoints, "initial"):
|
||||
p.waypoints = PackageWaypoints.create(p, c)
|
||||
|
||||
def _update_package_attributes(self) -> None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user