Merge branch 'develop' into helipads

# Conflicts:
#	game/data/weapons.py
#	game/db.py
#	game/theater/conflicttheater.py
#	resources/factions/france_1995.json
#	resources/factions/insurgents.json
#	resources/factions/iraq_1991.json
#	resources/factions/syria_1967_with_ww2_weapons.json
#	resources/factions/syria_2011.json
This commit is contained in:
Khopa
2021-05-21 13:58:22 +02:00
55 changed files with 345 additions and 132 deletions

View File

@@ -426,6 +426,7 @@ class BarCapFlightPlan(PatrollingFlightPlan):
takeoff: FlightWaypoint
land: FlightWaypoint
divert: Optional[FlightWaypoint]
bullseye: FlightWaypoint
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.takeoff
@@ -438,6 +439,7 @@ class BarCapFlightPlan(PatrollingFlightPlan):
yield self.land
if self.divert is not None:
yield self.divert
yield self.bullseye
@dataclass(frozen=True)
@@ -446,6 +448,7 @@ class CasFlightPlan(PatrollingFlightPlan):
target: FlightWaypoint
land: FlightWaypoint
divert: Optional[FlightWaypoint]
bullseye: FlightWaypoint
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.takeoff
@@ -459,6 +462,7 @@ class CasFlightPlan(PatrollingFlightPlan):
yield self.land
if self.divert is not None:
yield self.divert
yield self.bullseye
def request_escort_at(self) -> Optional[FlightWaypoint]:
return self.patrol_start
@@ -472,6 +476,7 @@ class TarCapFlightPlan(PatrollingFlightPlan):
takeoff: FlightWaypoint
land: FlightWaypoint
divert: Optional[FlightWaypoint]
bullseye: FlightWaypoint
lead_time: timedelta
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
@@ -485,6 +490,7 @@ class TarCapFlightPlan(PatrollingFlightPlan):
yield self.land
if self.divert is not None:
yield self.divert
yield self.bullseye
@property
def tot_offset(self) -> timedelta:
@@ -523,6 +529,7 @@ class StrikeFlightPlan(FormationFlightPlan):
nav_from: List[FlightWaypoint]
land: FlightWaypoint
divert: Optional[FlightWaypoint]
bullseye: FlightWaypoint
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.takeoff
@@ -537,6 +544,7 @@ class StrikeFlightPlan(FormationFlightPlan):
yield self.land
if self.divert is not None:
yield self.divert
yield self.bullseye
@property
def package_speed_waypoints(self) -> Set[FlightWaypoint]:
@@ -641,6 +649,7 @@ class SweepFlightPlan(LoiterFlightPlan):
nav_from: List[FlightWaypoint]
land: FlightWaypoint
divert: Optional[FlightWaypoint]
bullseye: FlightWaypoint
lead_time: timedelta
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
@@ -653,6 +662,7 @@ class SweepFlightPlan(LoiterFlightPlan):
yield self.land
if self.divert is not None:
yield self.divert
yield self.bullseye
@property
def tot_waypoint(self) -> Optional[FlightWaypoint]:
@@ -704,6 +714,7 @@ class AwacsFlightPlan(LoiterFlightPlan):
nav_from: List[FlightWaypoint]
land: FlightWaypoint
divert: Optional[FlightWaypoint]
bullseye: FlightWaypoint
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.takeoff
@@ -713,6 +724,7 @@ class AwacsFlightPlan(LoiterFlightPlan):
yield self.land
if self.divert is not None:
yield self.divert
yield self.bullseye
@property
def mission_start_time(self) -> Optional[timedelta]:
@@ -746,6 +758,7 @@ class AirliftFlightPlan(FlightPlan):
nav_to_home: List[FlightWaypoint]
land: FlightWaypoint
divert: Optional[FlightWaypoint]
bullseye: FlightWaypoint
def iter_waypoints(self) -> Iterator[FlightWaypoint]:
yield self.takeoff
@@ -758,6 +771,7 @@ class AirliftFlightPlan(FlightPlan):
yield self.land
if self.divert is not None:
yield self.divert
yield self.bullseye
@property
def tot_waypoint(self) -> Optional[FlightWaypoint]:
@@ -1053,6 +1067,7 @@ class FlightPlanBuilder:
),
land=builder.land(flight.arrival),
divert=builder.divert(flight.divert),
bullseye=builder.bullseye(),
hold=start,
hold_duration=timedelta(hours=4),
)
@@ -1151,6 +1166,7 @@ class FlightPlanBuilder:
patrol_end=end,
land=builder.land(flight.arrival),
divert=builder.divert(flight.divert),
bullseye=builder.bullseye(),
)
def generate_sweep(self, flight: Flight) -> SweepFlightPlan:
@@ -1187,6 +1203,7 @@ class FlightPlanBuilder:
sweep_end=end,
land=builder.land(flight.arrival),
divert=builder.divert(flight.divert),
bullseye=builder.bullseye(),
)
def generate_transport(self, flight: Flight) -> AirliftFlightPlan:
@@ -1238,6 +1255,7 @@ class FlightPlanBuilder:
),
land=builder.land(flight.arrival),
divert=builder.divert(flight.divert),
bullseye=builder.bullseye(),
)
def racetrack_for_objective(
@@ -1389,6 +1407,7 @@ class FlightPlanBuilder:
patrol_end=end,
land=builder.land(flight.arrival),
divert=builder.divert(flight.divert),
bullseye=builder.bullseye(),
)
def generate_dead(
@@ -1517,6 +1536,7 @@ class FlightPlanBuilder:
),
land=builder.land(flight.arrival),
divert=builder.divert(flight.divert),
bullseye=builder.bullseye(),
)
def generate_cas(self, flight: Flight) -> CasFlightPlan:
@@ -1562,6 +1582,7 @@ class FlightPlanBuilder:
patrol_end=builder.egress(egress, location),
land=builder.land(flight.arrival),
divert=builder.divert(flight.divert),
bullseye=builder.bullseye(),
)
@staticmethod
@@ -1696,6 +1717,7 @@ class FlightPlanBuilder:
),
land=builder.land(flight.arrival),
divert=builder.divert(flight.divert),
bullseye=builder.bullseye(),
)
def _retreating_rendezvous_point(self, attack_transition: Point) -> Point: