mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Cap squadron size, limit replenishment rate.
This caps squadrons to 12 pilots and limits their replenishment rate to 1 pilot per turn. Should probably make those values configurable, but they aren't currently. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1136
This commit is contained in:
@@ -424,7 +424,7 @@ class SquadronModel(QAbstractListModel):
|
||||
self.squadron = squadron
|
||||
|
||||
def rowCount(self, parent: QModelIndex = QModelIndex()) -> int:
|
||||
return self.squadron.number_of_pilots_including_dead
|
||||
return self.squadron.number_of_pilots_including_inactive
|
||||
|
||||
def data(self, index: QModelIndex, role: int = Qt.DisplayRole) -> Any:
|
||||
if not index.isValid():
|
||||
@@ -462,9 +462,9 @@ class SquadronModel(QAbstractListModel):
|
||||
pilot = self.pilot_at_index(index)
|
||||
self.beginResetModel()
|
||||
if pilot.on_leave:
|
||||
pilot.return_from_leave()
|
||||
self.squadron.return_from_leave(pilot)
|
||||
else:
|
||||
pilot.send_on_leave()
|
||||
self.squadron.send_on_leave(pilot)
|
||||
self.endResetModel()
|
||||
|
||||
def is_auto_assignable(self, task: FlightType) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user