Add AirAssault and Airlift mission types with CTLD support

- Add the new airassault mission type and special flightplans for it
- Add the mission type to airbase and FOB
- Add Layout for the UH-1H
- Add mission type to capable squadrons
- Allow the auto planner to task air assault missions when preconditions are met
- Improve Airlift mission type and improve the flightplan (Stopover and Helo landing)
- Allow Slingload and spawnable crates for airlift
- Rework airsupport to a general missiondata class
- Added Carrier Information to mission data
- Allow to define CTLD specific capabilities in the unit yaml
- Allow inflight preload and fixed wing support for air assault
This commit is contained in:
RndName
2022-04-12 12:42:17 +02:00
parent de148dbb61
commit aa77cfe4b9
73 changed files with 996 additions and 212 deletions

View File

@@ -86,7 +86,11 @@ class TransferOptionsPanel(QVBoxLayout):
super().__init__()
self.source_combo_box = TransferDestinationComboBox(game, origin)
self.transport_type = QComboBox()
self.transport_type.addItem("Auto", "auto")
self.transport_type.addItem("Airlift", "airlift")
self.addLayout(QLabeledWidget("Destination:", self.source_combo_box))
self.addLayout(QLabeledWidget("Requested transport type:", self.transport_type))
@property
def changed(self):
@@ -96,6 +100,10 @@ class TransferOptionsPanel(QVBoxLayout):
def current(self) -> ControlPoint:
return self.source_combo_box.currentData()
@property
def request_airlift(self) -> bool:
return self.transport_type.currentData() == "airlift"
class TransferControls(QGroupBox):
def __init__(
@@ -293,6 +301,7 @@ class NewUnitTransferDialog(QDialog):
origin=self.origin,
destination=destination,
units=transfers,
request_airflift=self.dest_panel.request_airlift,
)
self.game_model.transfer_model.new_transfer(transfer)
self.close()

View File

@@ -50,7 +50,9 @@ class QFlightCreator(QDialog):
layout = QVBoxLayout()
self.task_selector = QFlightTypeComboBox(self.game.theater, package.target)
self.task_selector = QFlightTypeComboBox(
self.game.theater, package.target, self.game.settings
)
self.task_selector.setCurrentIndex(0)
self.task_selector.currentIndexChanged.connect(self.on_task_changed)
layout.addLayout(QLabeledWidget("Task:", self.task_selector))

View File

@@ -62,6 +62,12 @@ class QFlightWaypointTab(QFrame):
self.recreate_buttons.clear()
for task in self.package.target.mission_types(for_player=True):
if task == FlightType.AIR_ASSAULT and not self.game.settings.plugin_option(
"ctld"
):
# Only add Air Assault if ctld plugin is enabled
continue
def make_closure(arg):
def closure():
return self.confirm_recreate(arg)