From 0edcd313671b63dc53b7af45a3adf3f49d02eb67 Mon Sep 17 00:00:00 2001 From: Raffson Date: Sun, 28 Jan 2024 19:20:22 +0100 Subject: [PATCH] Fix desync wrt off-map flights --- game/ato/flightplans/flightplan.py | 5 +++-- game/theater/controlpoint.py | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/game/ato/flightplans/flightplan.py b/game/ato/flightplans/flightplan.py index 1b7384c9..32e1d7c3 100644 --- a/game/ato/flightplans/flightplan.py +++ b/game/ato/flightplans/flightplan.py @@ -277,8 +277,9 @@ class FlightPlan(ABC, Generic[LayoutT]): else: return timedelta(minutes=8) - @staticmethod - def estimate_takeoff_time() -> timedelta: + def estimate_takeoff_time(self) -> timedelta: + if self.flight.departure.is_offmap: + return timedelta() return timedelta(seconds=30) @property diff --git a/game/theater/controlpoint.py b/game/theater/controlpoint.py index 69908e44..b068b936 100644 --- a/game/theater/controlpoint.py +++ b/game/theater/controlpoint.py @@ -646,6 +646,10 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC): """ return False + @property + def is_offmap(self) -> bool: + return False + @property def moveable(self) -> bool: """ @@ -1578,6 +1582,10 @@ class OffMapSpawn(ControlPoint): def status(self) -> ControlPointStatus: return ControlPointStatus.Functional + @property + def is_offmap(self) -> bool: + return True + class Fob(ControlPoint, RadioFrequencyContainer, CTLD): def __init__(