mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Change squadrons to operate out of a single base.
https://github.com/dcs-liberation/dcs_liberation/issues/1145 Currently this is fixed at the start of the campaign. The squadron locations are defined by the campaign file. Follow up work: * Track aircraft ownership per-squadron rather than per-airbase. * UI for relocating squadrons. * Ferry missions for squadrons that are relocating. * Auto-relocation (probably only for retreat handling). Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1138
This commit is contained in:
@@ -34,13 +34,17 @@ class SquadronDelegate(TwoColumnRowDelegate):
|
||||
return index.data(AirWingModel.SquadronRole)
|
||||
|
||||
def text_for(self, index: QModelIndex, row: int, column: int) -> str:
|
||||
squadron = self.squadron(index)
|
||||
if (row, column) == (0, 0):
|
||||
return self.squadron(index).name
|
||||
if squadron.nickname:
|
||||
nickname = f' "{squadron.nickname}"'
|
||||
else:
|
||||
nickname = ""
|
||||
return f"{squadron.name}{nickname}"
|
||||
elif (row, column) == (0, 1):
|
||||
squadron = self.air_wing_model.data(index, AirWingModel.SquadronRole)
|
||||
return squadron.aircraft.name
|
||||
elif (row, column) == (1, 0):
|
||||
return self.squadron(index).nickname or ""
|
||||
return squadron.location.name
|
||||
elif (row, column) == (1, 1):
|
||||
squadron = self.squadron(index)
|
||||
active = len(squadron.active_pilots)
|
||||
|
||||
Reference in New Issue
Block a user