mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Silence some useless generation warnings.
This commit is contained in:
parent
acd63fdeac
commit
f3bf9c0c3c
@ -487,7 +487,12 @@ REFUELING_CAPABALE = [
|
||||
|
||||
|
||||
def dcs_types_for_task(task: FlightType) -> Sequence[Type[FlyingType]]:
|
||||
cap_missions = (FlightType.BARCAP, FlightType.TARCAP, FlightType.SWEEP)
|
||||
cap_missions = (
|
||||
FlightType.BARCAP,
|
||||
FlightType.INTERCEPTION,
|
||||
FlightType.SWEEP,
|
||||
FlightType.TARCAP,
|
||||
)
|
||||
if task in cap_missions:
|
||||
return CAP_CAPABLE
|
||||
elif task == FlightType.ANTISHIP:
|
||||
@ -530,8 +535,11 @@ def aircraft_for_task(task: FlightType) -> list[AircraftType]:
|
||||
|
||||
|
||||
def tasks_for_aircraft(aircraft: AircraftType) -> list[FlightType]:
|
||||
tasks = []
|
||||
tasks: list[FlightType] = []
|
||||
for task in FlightType:
|
||||
if task is FlightType.FERRY:
|
||||
# Not a plannable task, so skip it.
|
||||
continue
|
||||
if aircraft in aircraft_for_task(task):
|
||||
tasks.append(task)
|
||||
return tasks
|
||||
|
||||
@ -1,36 +1,36 @@
|
||||
from typing import Optional, Callable, Iterable
|
||||
from typing import Callable, Iterable, Optional
|
||||
|
||||
from PySide6.QtCore import (
|
||||
QItemSelection,
|
||||
QItemSelectionModel,
|
||||
QModelIndex,
|
||||
QSize,
|
||||
Qt,
|
||||
QItemSelection,
|
||||
Signal,
|
||||
)
|
||||
from PySide6.QtGui import QStandardItemModel, QStandardItem, QIcon
|
||||
from PySide6.QtGui import QIcon, QStandardItem, QStandardItemModel
|
||||
from PySide6.QtWidgets import (
|
||||
QDialog,
|
||||
QListView,
|
||||
QVBoxLayout,
|
||||
QGroupBox,
|
||||
QLabel,
|
||||
QWidget,
|
||||
QScrollArea,
|
||||
QLineEdit,
|
||||
QTextEdit,
|
||||
QCheckBox,
|
||||
QComboBox,
|
||||
QDialog,
|
||||
QGroupBox,
|
||||
QHBoxLayout,
|
||||
QLabel,
|
||||
QLineEdit,
|
||||
QListView,
|
||||
QScrollArea,
|
||||
QStackedLayout,
|
||||
QTabWidget,
|
||||
QComboBox,
|
||||
QTextEdit,
|
||||
QVBoxLayout,
|
||||
QWidget,
|
||||
)
|
||||
|
||||
from game import Game
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.squadrons import AirWing, Pilot, Squadron
|
||||
from game.theater import ControlPoint, ConflictTheater
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.theater import ConflictTheater, ControlPoint
|
||||
from qt_ui.uiconstants import AIRCRAFT_ICONS
|
||||
|
||||
|
||||
@ -49,6 +49,9 @@ class AllowedMissionTypeControls(QVBoxLayout):
|
||||
return callback
|
||||
|
||||
for task in FlightType:
|
||||
if task is FlightType.FERRY:
|
||||
# Not plannable so just skip it.
|
||||
continue
|
||||
enabled = task in squadron.mission_types
|
||||
if enabled:
|
||||
self.allowed_mission_types.add(task)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user