mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
add vertical takeoff and landing option
This commit is contained in:
parent
dd408f392b
commit
dec57fccf9
@ -45,6 +45,7 @@
|
||||
* **[Modding]** Support for Bandit's cloud presets mod (v15)
|
||||
* **[UX]** Reduce size of save-file by loading landmap data on the fly, which also implies no new campaign needs to be started to benefit from an updated landmap
|
||||
* **[New Game Wizard]** Ability to save an edited faction during new game creation
|
||||
* **[Options]** New option to make AI helicopters prefer vertical takeoff and landing
|
||||
|
||||
## Fixes
|
||||
* **[UI/UX]** A-10A flights can be edited again
|
||||
|
||||
@ -30,6 +30,7 @@ from dcs.task import (
|
||||
OptNoReportWaypointPass,
|
||||
OptRadioUsageContact,
|
||||
OptRadioSilence,
|
||||
OptVerticalTakeoffLanding,
|
||||
Tanker,
|
||||
RecoveryTanker,
|
||||
ActivateBeaconCommand,
|
||||
@ -114,6 +115,7 @@ class AircraftBehavior:
|
||||
mission_uses_gun: bool = True,
|
||||
rtb_on_bingo: bool = True,
|
||||
ai_unlimited_fuel: Optional[bool] = None,
|
||||
ai_vertical_takoff_landing: Optional[bool] = None,
|
||||
) -> None:
|
||||
group.points[0].tasks.clear()
|
||||
if ai_unlimited_fuel is None:
|
||||
@ -121,6 +123,11 @@ class AircraftBehavior:
|
||||
flight.squadron.coalition.game.settings.ai_unlimited_fuel
|
||||
)
|
||||
|
||||
if ai_vertical_takoff_landing is None:
|
||||
ai_vertical_takoff_landing = (
|
||||
flight.squadron.coalition.game.settings.ai_vertical_takoff_landing
|
||||
)
|
||||
|
||||
# at IP, insert waypoint to orient aircraft in correct direction
|
||||
layout = flight.flight_plan.layout
|
||||
at_ip_or_combat = flight.state.is_at_ip or flight.state.in_combat
|
||||
@ -150,6 +157,9 @@ class AircraftBehavior:
|
||||
if rtb_winchester is not None:
|
||||
group.points[0].tasks.append(OptRTBOnOutOfAmmo(rtb_winchester))
|
||||
|
||||
if ai_vertical_takoff_landing and flight.is_helo:
|
||||
group.points[0].tasks.append(OptVerticalTakeoffLanding(True))
|
||||
|
||||
# Confiscate the bullets of AI missions that do not rely on the gun. There is no
|
||||
# "all but gun" RTB winchester option, so air to ground missions with mixed
|
||||
# weapon types will insist on using all of their bullets after running out of
|
||||
|
||||
@ -332,6 +332,13 @@ class Settings:
|
||||
default=False,
|
||||
detail="AI will jettison their fuel tanks as soon as they're empty.",
|
||||
)
|
||||
ai_vertical_takoff_landing: bool = boolean_option(
|
||||
"AI helicopters use vertical takeoff and landing",
|
||||
page=CAMPAIGN_DOCTRINE_PAGE,
|
||||
section=GENERAL_SECTION,
|
||||
default=False,
|
||||
detail="AI will use vertical takeoff and landing instead of combat takeoff and landing.",
|
||||
)
|
||||
max_plane_altitude_offset: int = bounded_int_option(
|
||||
"Maximum randomized altitude offset (x1000 ft) for airplanes.",
|
||||
page=CAMPAIGN_DOCTRINE_PAGE,
|
||||
|
||||
@ -33,7 +33,7 @@ pluggy==1.5.0
|
||||
pre-commit==3.7.1
|
||||
pydantic==2.7.4
|
||||
pydantic-settings==2.3.3
|
||||
pydcs @ git+https://github.com/dcs-retribution/pydcs@a5292f2d1803ba13dd83d6b024837d8eb44fd702
|
||||
pydcs @ git+https://github.com/dcs-retribution/pydcs@aa892f0da70586febfe8046bcd92cae4eae70964
|
||||
pyinstaller==5.13.2
|
||||
pyinstaller-hooks-contrib==2024.0
|
||||
pyparsing==3.1.2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user