mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Configurable tanker on-station time (#69)
This commit is contained in:
parent
1deff6fa49
commit
01ee24c8cf
@ -4,6 +4,7 @@
|
|||||||
* **[Mission Generation]** Given a CAS flight was planned, delay ground force attack until first CAS flight is on station
|
* **[Mission Generation]** Given a CAS flight was planned, delay ground force attack until first CAS flight is on station
|
||||||
* **[Mission Generation]** Add option to switch ATFLIR to LITENING automatically for ground based F-18C flights
|
* **[Mission Generation]** Add option to switch ATFLIR to LITENING automatically for ground based F-18C flights
|
||||||
* **[Mission Generation]** Add option to configure OPFOR autoplanner aggressiveness and have the AI take risks and plan missions against defended targets
|
* **[Mission Generation]** Add option to configure OPFOR autoplanner aggressiveness and have the AI take risks and plan missions against defended targets
|
||||||
|
* **[Mission Generation]** Add option to configure the desired tanker on-station time in settings
|
||||||
* **[Cheat Menu]** Option to instantly transfer squadrons across bases.
|
* **[Cheat Menu]** Option to instantly transfer squadrons across bases.
|
||||||
* **[UI]** Add selectable units in faction overview during campaign generation.
|
* **[UI]** Add selectable units in faction overview during campaign generation.
|
||||||
* **[UI]** Add button to rename pilots in Air Wing's Squadron dialog.
|
* **[UI]** Add button to rename pilots in Air Wing's Squadron dialog.
|
||||||
|
|||||||
@ -23,9 +23,17 @@ class PackageRefuelingFlightPlan(RefuelingFlightPlan):
|
|||||||
def patrol_duration(self) -> timedelta:
|
def patrol_duration(self) -> timedelta:
|
||||||
# TODO: Only consider aircraft that can refuel with this tanker type.
|
# TODO: Only consider aircraft that can refuel with this tanker type.
|
||||||
refuel_time_minutes = 5
|
refuel_time_minutes = 5
|
||||||
|
min_patrol_duration = refuel_time_minutes
|
||||||
|
|
||||||
for self.flight in self.package.flights:
|
for self.flight in self.package.flights:
|
||||||
flight_size = self.flight.roster.max_size
|
flight_size = self.flight.roster.max_size
|
||||||
refuel_time_minutes = refuel_time_minutes + 4 * flight_size + 1
|
refuel_time_minutes = refuel_time_minutes + 4 * flight_size + 1
|
||||||
|
min_patrol_duration = (
|
||||||
|
self.flight.coalition.game.settings.desired_tanker_on_station_time.seconds
|
||||||
|
// 60
|
||||||
|
)
|
||||||
|
if refuel_time_minutes < min_patrol_duration:
|
||||||
|
refuel_time_minutes = min_patrol_duration
|
||||||
|
|
||||||
return timedelta(minutes=refuel_time_minutes)
|
return timedelta(minutes=refuel_time_minutes)
|
||||||
|
|
||||||
|
|||||||
@ -386,6 +386,14 @@ class Settings:
|
|||||||
min=30,
|
min=30,
|
||||||
max=150,
|
max=150,
|
||||||
)
|
)
|
||||||
|
desired_tanker_on_station_time: timedelta = minutes_option(
|
||||||
|
"Desired tanker on-station time",
|
||||||
|
page=MISSION_GENERATOR_PAGE,
|
||||||
|
section=GAMEPLAY_SECTION,
|
||||||
|
default=timedelta(minutes=60),
|
||||||
|
min=30,
|
||||||
|
max=150,
|
||||||
|
)
|
||||||
# Mission specific
|
# Mission specific
|
||||||
max_frontline_length: int = bounded_int_option(
|
max_frontline_length: int = bounded_int_option(
|
||||||
"Maximum frontline length (km)",
|
"Maximum frontline length (km)",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user