From 96f940bc59d34a4c20cf5c44fce9b657a4f7c9c4 Mon Sep 17 00:00:00 2001 From: Eclipse/Druss99 Date: Sun, 12 Oct 2025 12:23:55 -0400 Subject: [PATCH] fix bugs with mixed parking --- changelog.md | 1 + qt_ui/windows/SquadronDialog.py | 6 +++--- qt_ui/windows/basemenu/QBaseMenu2.py | 22 +++++++++++++++++----- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/changelog.md b/changelog.md index bb7e73b3..fb4c0d8d 100644 --- a/changelog.md +++ b/changelog.md @@ -25,6 +25,7 @@ * **[Flight Plans]** Fixed a bug where SEAD flights would fire one ARM and RTB * **[Plugins]** EW Script - Fix radar detection routine. * **[Campaign]** Fixed a bug where sinking a destroyer in a carrier group would cause squadrons to be removed from the carrier +* **[Engine]** Fixed a bug with transfers to Helipads # Retribution v1.4.1 (hotfix) diff --git a/qt_ui/windows/SquadronDialog.py b/qt_ui/windows/SquadronDialog.py index ab2b72eb..ea3d64c2 100644 --- a/qt_ui/windows/SquadronDialog.py +++ b/qt_ui/windows/SquadronDialog.py @@ -190,12 +190,12 @@ class SquadronDestinationComboBox(QComboBox): or cp.coalition.game.settings.ground_start_ai_planes ) - if free_helicopter_slots > 0 and (is_heli or is_vtol): - free_helicopter_slots = -1 + if free_helicopter_slots > 0 and is_heli: + free_helicopter_slots -= 1 elif free_ground_spawns > 0 and ( is_heli or is_vtol or count_ground_spawns ): - free_ground_spawns = -1 + free_ground_spawns -= 1 else: slot = ap.free_parking_slot(s.aircraft.dcs_unit_type) if slot: diff --git a/qt_ui/windows/basemenu/QBaseMenu2.py b/qt_ui/windows/basemenu/QBaseMenu2.py index 1e2ad458..63a3b552 100644 --- a/qt_ui/windows/basemenu/QBaseMenu2.py +++ b/qt_ui/windows/basemenu/QBaseMenu2.py @@ -303,9 +303,8 @@ class QBaseMenu2(QDialog): fixed_wing=False, fixed_wing_stol=False, rotary_wing=True ) - fixed_wing_parking = self.cp.total_aircraft_parking(parking_type_fixed_wing) ground_spawn_parking = self.cp.total_aircraft_parking(parking_type_stol) - rotary_wing_parking = self.cp.total_aircraft_parking(parking_type_rotary_wing) + helipads = self.cp.total_aircraft_parking(parking_type_rotary_wing) ground_unit_limit = self.cp.frontline_unit_count_limit deployable_unit_info = "" @@ -319,14 +318,27 @@ class QBaseMenu2(QDialog): deployable_unit_info = ( f" (Up to {ground_unit_limit} deployable, {unit_overage} reserve)" ) - + fixed_wing_airfield_parking = [ + slot + for slot in self.cp.parking_slots + if slot.airplanes and not slot.helicopter + ] + rotary_wing_airfield_parking = [ + slot + for slot in self.cp.parking_slots + if slot.helicopter and not slot.airplanes + ] + mixed_parking = [ + slot for slot in self.cp.parking_slots if slot.helicopter and slot.airplanes + ] self.intel_summary.setText( "\n".join( [ f"{aircraft}/{parking} aircraft", - f"{fixed_wing_parking} fixed wing parking", + f"{len(fixed_wing_airfield_parking)} fixed-wing only parking", + f"{len(rotary_wing_airfield_parking) + helipads} rotary-wing only parking", + f"{len(mixed_parking)} mixed parking", f"{ground_spawn_parking} ground spawns", - f"{rotary_wing_parking} rotary wing parking", f"{self.cp.base.total_armor} ground units" + deployable_unit_info, f"{allocated.total_transferring} more ground units en route, {allocated.total_ordered} ordered", str(self.cp.runway_status),