diff --git a/game/db.py b/game/db.py index 82a80fed..49202765 100644 --- a/game/db.py +++ b/game/db.py @@ -180,6 +180,7 @@ from pydcs_extensions.su57.su57 import Su_57 UNITINFOTEXT_PATH = Path("./resources/units/unit_info_text.json") plane_map["A-4E-C"] = A_4E_C +plane_map["F-22A"] = F_22A plane_map["MB-339PAN"] = MB_339PAN plane_map["Rafale_M"] = Rafale_M plane_map["Rafale_A_S"] = Rafale_A_S diff --git a/gen/aircraft.py b/gen/aircraft.py index db3bdb65..024a49c4 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -656,6 +656,12 @@ AIRCRAFT_DATA: Dict[str, AircraftData] = { ), channel_namer=HueyChannelNamer, ), + "F-22A": AircraftData( + inter_flight_radio=get_radio("SCR-522"), + intra_flight_radio=get_radio("SCR-522"), + channel_allocator=None, + channel_namer=SCR522ChannelNamer, + ), } AIRCRAFT_DATA["A-10C_2"] = AIRCRAFT_DATA["A-10C"] AIRCRAFT_DATA["P-51D-30-NA"] = AIRCRAFT_DATA["P-51D"] diff --git a/gen/flights/ai_flight_planner_db.py b/gen/flights/ai_flight_planner_db.py index 67a38d3d..4f30474a 100644 --- a/gen/flights/ai_flight_planner_db.py +++ b/gen/flights/ai_flight_planner_db.py @@ -88,6 +88,7 @@ from dcs.planes import ( Tu_22M3, Tu_95MS, WingLoong_I, + I_16, ) from dcs.unittype import FlyingType diff --git a/pydcs b/pydcs index 5ffae3c7..42de2ec3 160000 --- a/pydcs +++ b/pydcs @@ -1 +1 @@ -Subproject commit 5ffae3c76b99610ab5065c7317a8a5c72c7e4afb +Subproject commit 42de2ec352903d592ca123950b4b12a15ffa6544 diff --git a/qt_ui/widgets/map/QLiberationMap.py b/qt_ui/widgets/map/QLiberationMap.py index e42f6659..d8b5f206 100644 --- a/qt_ui/widgets/map/QLiberationMap.py +++ b/qt_ui/widgets/map/QLiberationMap.py @@ -915,35 +915,48 @@ class QLiberationMap(QGraphicsView): SMALL_LINE = 2 dist = self.distance_to_pixels(nautical_miles(scale_distance_nm)) - self.scene().addRect( - POS_X, - POS_Y - PADDING, - PADDING * 2 + dist, - BIG_LINE * 2 + 3 * PADDING, - pen=CONST.COLORS["black"], - brush=CONST.COLORS["black"], - ) l = self.scene().addLine( POS_X + PADDING, POS_Y + BIG_LINE * 2, POS_X + PADDING + dist, POS_Y + BIG_LINE * 2, ) + l.setPen(CONST.COLORS["black"]) + + lw = self.scene().addLine( + POS_X + PADDING + 1, + POS_Y + BIG_LINE * 2 + 1, + POS_X + PADDING + dist + 1, + POS_Y + BIG_LINE * 2 + 1, + ) + lw.setPen(CONST.COLORS["white"]) text = self.scene().addText( "0nm", font=QFont("Trebuchet MS", 6, weight=5, italic=False) ) text.setPos(POS_X, POS_Y + BIG_LINE * 2) - text.setDefaultTextColor(Qt.white) + text.setDefaultTextColor(Qt.black) + + text_white = self.scene().addText( + "0nm", font=QFont("Trebuchet MS", 6, weight=5, italic=False) + ) + text_white.setPos(POS_X + 1, POS_Y + BIG_LINE * 2) + text_white.setDefaultTextColor(Qt.white) text2 = self.scene().addText( str(scale_distance_nm) + "nm", font=QFont("Trebuchet MS", 6, weight=5, italic=False), ) text2.setPos(POS_X + dist, POS_Y + BIG_LINE * 2) - text2.setDefaultTextColor(Qt.white) + text2.setDefaultTextColor(Qt.black) + + text2_white = self.scene().addText( + str(scale_distance_nm) + "nm", + font=QFont("Trebuchet MS", 6, weight=5, italic=False), + ) + text2_white.setPos(POS_X + dist + 1, POS_Y + BIG_LINE * 2) + text2_white.setDefaultTextColor(Qt.white) - l.setPen(CONST.COLORS["white"]) for i in range(number_of_points + 1): d = float(i) / float(number_of_points) if i == 0 or i == number_of_points: @@ -957,7 +970,15 @@ class QLiberationMap(QGraphicsView): POS_X + PADDING + d * dist, POS_Y + BIG_LINE - h, ) - l.setPen(CONST.COLORS["white"]) + l.setPen(CONST.COLORS["black"]) + + lw = self.scene().addLine( + POS_X + PADDING + d * dist + 1, + POS_Y + BIG_LINE * 2, + POS_X + PADDING + d * dist + 1, + POS_Y + BIG_LINE - h, + ) + lw.setPen(CONST.COLORS["white"]) def wheelEvent(self, event: QWheelEvent): if event.angleDelta().y() > 0: diff --git a/qt_ui/windows/QUnitInfoWindow.py b/qt_ui/windows/QUnitInfoWindow.py index 541f208b..cd87a07f 100644 --- a/qt_ui/windows/QUnitInfoWindow.py +++ b/qt_ui/windows/QUnitInfoWindow.py @@ -48,6 +48,9 @@ class QUnitInfoWindow(QDialog): header = QLabel(self) header.setGeometry(0, 0, 720, 360) + + pixmap = None + if ( dcs.planes.plane_map.get(self.unit_type.id) is not None or dcs.helicopters.helicopter_map.get(self.unit_type.id) is not None diff --git a/qt_ui/windows/mission/flight/payload/QPylonEditor.py b/qt_ui/windows/mission/flight/payload/QPylonEditor.py index eb0314cb..8591b7d6 100644 --- a/qt_ui/windows/mission/flight/payload/QPylonEditor.py +++ b/qt_ui/windows/mission/flight/payload/QPylonEditor.py @@ -81,6 +81,10 @@ class QPylonEditor(QComboBox): ) ) else: - self.setCurrentText( - weapons_data.weapon_ids.get(pylon_default_weapon).get("name") - ) + weapon = weapons_data.weapon_ids.get(pylon_default_weapon) + if weapon is not None: + self.setCurrentText( + weapons_data.weapon_ids.get(pylon_default_weapon).get("name") + ) + else: + self.setCurrentText(pylon_default_weapon) diff --git a/resources/ui/units/aircrafts/banners/F-22A_24.jpg b/resources/ui/units/aircrafts/banners/F-22A_24.jpg new file mode 100644 index 00000000..15d6071a Binary files /dev/null and b/resources/ui/units/aircrafts/banners/F-22A_24.jpg differ diff --git a/resources/ui/units/aircrafts/icons/F-22A_24.jpg b/resources/ui/units/aircrafts/icons/F-22A_24.jpg new file mode 100644 index 00000000..22df550a Binary files /dev/null and b/resources/ui/units/aircrafts/icons/F-22A_24.jpg differ