From dc3d1b0b5b825911764802cbc1846f205bc2e63c Mon Sep 17 00:00:00 2001 From: zhexu14 <64713351+zhexu14@users.noreply.github.com> Date: Sun, 14 Apr 2024 21:58:30 +1000 Subject: [PATCH] Make theater refuelling flight plan on-station time configurable based on the desired mission duration (#3375) This PR - Addresses #1511 by setting the tanker on-station time to the desired mission duration + 30 minutes - Elaborate on what the desired mission duration setting does in the Settings UI. --- changelog.md | 1 + game/ato/flightplans/theaterrefueling.py | 8 +++++++- game/settings/settings.py | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 5af0e59ee..fbe9927cc 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,7 @@ Saves from 11.x are not compatible with 12.0.0. * **[Campaign]** Fixed double counting of parked aircraft kills when DCS reports multiple kill events. * **[Campaign]** Fixed error where frontline units are not re-deployed when multiple control points were captured in one turn or when control points are captured "out of order" using air-assault missions. * **[Cheat Menu]** Re-deploy frontline units when using cheats to capture control points, so that cheats behave the same way as capturing a control point in-mission. +* **[Flight Planning]** Theater refuelling flight plans (those not tied to a particular package) will remain on station for a longer period, specifically the desired mission duration + 30 minutes. By default, this increases the on-station time from 1 hour to 1.5 hours. * **[UI]** Naval control points (carriers, LHAs) can no longer be moved onto land. diff --git a/game/ato/flightplans/theaterrefueling.py b/game/ato/flightplans/theaterrefueling.py index d93eb4a8e..7add5cf72 100644 --- a/game/ato/flightplans/theaterrefueling.py +++ b/game/ato/flightplans/theaterrefueling.py @@ -17,7 +17,13 @@ def builder_type() -> Type[Builder]: @property def patrol_duration(self) -> timedelta: - return timedelta(hours=1) + # Add 30 minutes to desired_player_mission_duration as TOTs for flights + # can sit up to this time. This extension means the tanker remains on + # station for the flights' return. + return ( + self.flight.coalition.game.settings.desired_player_mission_duration + + timedelta(minutes=30) + ) class Builder(IBuilder[TheaterRefuelingFlightPlan, PatrollingLayout]): diff --git a/game/settings/settings.py b/game/settings/settings.py index 8f7409338..e75abdfe7 100644 --- a/game/settings/settings.py +++ b/game/settings/settings.py @@ -467,6 +467,12 @@ class Settings: default=timedelta(minutes=60), min=30, max=150, + detail=( + "Period of time after the start of a turn where " + "there is coverage by one or more CAP flight(s), " + "refuelling flights not tied to a specific package are on station, " + "and other flights have their TOTs." + ), ) # Performance