From bf1e559a41e0776b8b7528de1809186451969992 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Sun, 13 Aug 2023 11:15:54 -0700 Subject: [PATCH] Remove dead code. --- game/ato/flightplans/formationattack.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/game/ato/flightplans/formationattack.py b/game/ato/flightplans/formationattack.py index 2655d474..e161aa1b 100644 --- a/game/ato/flightplans/formationattack.py +++ b/game/ato/flightplans/formationattack.py @@ -14,7 +14,6 @@ from game.utils import Speed, meters from .flightplan import FlightPlan from .formation import FormationFlightPlan, FormationLayout from .ibuilder import IBuilder -from .planningerror import PlanningError from .waypointbuilder import StrikeTarget, WaypointBuilder from .. import FlightType from ..flightwaypoint import FlightWaypoint @@ -56,29 +55,6 @@ class FormationAttackFlightPlan(FormationFlightPlan, ABC): "RADIO", ) - @property - def travel_time_to_target(self) -> timedelta: - """The estimated time between the first waypoint and the target.""" - destination = self.tot_waypoint - total = timedelta() - for previous_waypoint, waypoint in self.edges(): - if waypoint == self.tot_waypoint: - # For anything strike-like the TOT waypoint is the *flight's* - # mission target, but to synchronize with the rest of the - # package we need to use the travel time to the same position as - # the others. - total += self.travel_time_between_waypoints( - previous_waypoint, self.target_area_waypoint - ) - break - total += self.travel_time_between_waypoints(previous_waypoint, waypoint) - else: - raise PlanningError( - f"Did not find destination waypoint {destination} in " - f"waypoints for {self.flight}" - ) - return total - @property def join_time(self) -> datetime: travel_time = self.travel_time_between_waypoints(