diff --git a/changelog.md b/changelog.md index 780a1248..d587aa85 100644 --- a/changelog.md +++ b/changelog.md @@ -23,6 +23,7 @@ Saves from 2.3 are not compatible with 2.4. * **[Economy]** Carriers and off-map spawns generate no income (previously $20M like airbases). * **[Economy]** Sales of aircraft and ground vehicles can now be cancelled before the next turn begins. * **[UI]** Multi-SAM objectives now show threat and detection rings per group. +* **[UI]** New icon for AA sites with no active threat. * **[UI]** Unit names are now prettier and more accurate, and can now be set per-country for added historical flavour. * **[UI]** Default loadout is now shown for flights with no custom loadout selected. * **[UI]** Aircraft for a new flight are now only selectable if they match the task type for that flight. diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index 066add27..1ac196f6 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -132,6 +132,8 @@ def load_icons(): ICONS["ship_blue"] = QPixmap("./resources/ui/ground_assets/ship_blue.png") ICONS["missile"] = QPixmap("./resources/ui/ground_assets/missile.png") ICONS["missile_blue"] = QPixmap("./resources/ui/ground_assets/missile_blue.png") + ICONS["nothreat"] = QPixmap("./resources/ui/ground_assets/nothreat.png") + ICONS["nothreat_blue"] = QPixmap("./resources/ui/ground_assets/nothreat_blue.png") ICONS["Generator"] = QPixmap("./resources/ui/misc/"+get_theme_icons()+"/generator.png") ICONS["Missile"] = QPixmap("./resources/ui/misc/"+get_theme_icons()+"/missile.png") diff --git a/qt_ui/widgets/map/QMapGroundObject.py b/qt_ui/widgets/map/QMapGroundObject.py index 7d8217b5..a0f51205 100644 --- a/qt_ui/widgets/map/QMapGroundObject.py +++ b/qt_ui/widgets/map/QMapGroundObject.py @@ -85,10 +85,22 @@ class QMapGroundObject(QMapObject): is_dead = False break + if cat == "aa": + has_threat = False + for group in self.ground_object.groups: + if self.ground_object.threat_range(group).distance_in_meters > 0: + has_threat = True + if not is_dead and not self.control_point.captured: - painter.drawPixmap(rect, const.ICONS[cat + enemy_icons]) + if cat == "aa" and not has_threat: + painter.drawPixmap(rect, const.ICONS["nothreat" + enemy_icons]) + else: + painter.drawPixmap(rect, const.ICONS[cat + enemy_icons]) elif not is_dead: - painter.drawPixmap(rect, const.ICONS[cat + player_icons]) + if cat == "aa" and not has_threat: + painter.drawPixmap(rect, const.ICONS["nothreat" + player_icons]) + else: + painter.drawPixmap(rect, const.ICONS[cat + player_icons]) else: painter.drawPixmap(rect, const.ICONS["destroyed"]) diff --git a/resources/ui/ground_assets/nothreat.png b/resources/ui/ground_assets/nothreat.png new file mode 100644 index 00000000..175fa290 Binary files /dev/null and b/resources/ui/ground_assets/nothreat.png differ diff --git a/resources/ui/ground_assets/nothreat_blue.png b/resources/ui/ground_assets/nothreat_blue.png new file mode 100644 index 00000000..46f2532a Binary files /dev/null and b/resources/ui/ground_assets/nothreat_blue.png differ