diff --git a/changelog.md b/changelog.md index 96edd054..f09addf7 100644 --- a/changelog.md +++ b/changelog.md @@ -18,6 +18,7 @@ Saves from 2.5 are not compatible with 2.6. * **[UI]** Engagement ranges are now displayed by default. * **[UI]** Engagement range display generalized to work for all patrolling flight plans (BARCAP, TARCAP, and CAS). +* **[Flight Planner]** Front lines no longer project threat zones to avoid pushing BARCAPs back so much. TARCAPs will be forcibly planned but strike packages will not route around front lines even if it is reasonable to do so. ## Fixes diff --git a/game/threatzones.py b/game/threatzones.py index 85169f17..e4ad0c39 100644 --- a/game/threatzones.py +++ b/game/threatzones.py @@ -152,23 +152,6 @@ class ThreatZones: threat_zone = point.buffer(threat_range.meters) air_defenses.append(threat_zone) - for front_line in game.theater.conflicts(player): - vector = Conflict.frontline_vector( - front_line.control_point_a, front_line.control_point_b, game.theater - ) - - start = vector[0] - end = vector[0].point_from_heading(vector[1], vector[2]) - - line = LineString( - [ - ShapelyPoint(start.x, start.y), - ShapelyPoint(end.x, end.y), - ] - ) - doctrine = game.faction_for(player).doctrine - air_threats.append(line.buffer(doctrine.cap_engagement_range.meters)) - return cls( airbases=unary_union(air_threats), air_defenses=unary_union(air_defenses) ) diff --git a/gen/flights/ai_flight_planner.py b/gen/flights/ai_flight_planner.py index 909eb873..72309cd9 100644 --- a/gen/flights/ai_flight_planner.py +++ b/gen/flights/ai_flight_planner.py @@ -589,9 +589,23 @@ class CoalitionMissionPlanner: front_line, [ ProposedFlight(FlightType.CAS, 2, self.MAX_CAS_RANGE), - ProposedFlight( - FlightType.TARCAP, 2, self.MAX_CAP_RANGE, EscortType.AirToAir - ), + # This is *not* an escort because front lines don't create a threat + # zone. Generating threat zones from front lines causes the front + # line to push back BARCAPs as it gets closer to the base. While + # front lines do have the same problem of potentially pulling + # BARCAPs off bases to engage a front line TARCAP, that's probably + # the one time where we do want that. + # + # TODO: Use intercepts and extra TARCAPs to cover bases near fronts. + # We don't have intercept missions yet so this isn't something we + # can do today, but we should probably return to having the front + # line project a threat zone (so that strike missions will route + # around it) and instead *not plan* a BARCAP at bases near the + # front, since there isn't a place to put a barrier. Instead, the + # aircraft that would have been a BARCAP could be used as additional + # interceptors and TARCAPs which will defend the base but won't be + # trying to avoid front line contacts. + ProposedFlight(FlightType.TARCAP, 2, self.MAX_CAP_RANGE), ], )