Renumber flight members for meatbags.

Puny humans count wrong, but we ought to match DCS.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3244.
This commit is contained in:
Dan Albert 2023-11-30 18:23:37 -08:00
parent c6f812238c
commit b99eb49dcf
2 changed files with 5 additions and 3 deletions

View File

@ -8,6 +8,8 @@ Saves from 9.x are not compatible with 10.0.0.
## Fixes
* **[UI]** Flight members in the loadout menu are now numbered starting from 1 instead of 0.
# 9.0.0
Saves from 8.x are not compatible with 9.0.0.

View File

@ -38,12 +38,12 @@ class FlightMemberSelector(QSpinBox):
def __init__(self, flight: Flight, parent: QWidget | None = None) -> None:
super().__init__(parent)
self.flight = flight
self.setMinimum(0)
self.setMaximum(flight.count - 1)
self.setMinimum(1)
self.setMaximum(flight.count)
@property
def selected_member(self) -> FlightMember:
return self.flight.roster.members[self.value()]
return self.flight.roster.members[self.value() - 1]
class QFlightPayloadTab(QFrame):