mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Adds a new icon for AA sites with no threat.
Also adds the logic to check for this state. Contributes-to: #239
This commit is contained in:
@@ -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"])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user