mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix SA-8 LD used incorrectly as SA-13 and cleanup
- The SA-8 LD unit hat the SA-13 unit name as variant. The Layout tried to create a SA-13 SHORAD Site but actually used an SA-8 LD unit instead with zero threat range. This resulted in a yellow marked GroundObject on the map - Cleaned up the treat and radar range functions a bit
This commit is contained in:
@@ -76,22 +76,10 @@ class GroundObjectJs(QObject):
|
||||
def samThreatRanges(self) -> List[float]:
|
||||
if not self.tgo.might_have_aa:
|
||||
return []
|
||||
|
||||
ranges = []
|
||||
for group in self.tgo.groups:
|
||||
threat_range = self.tgo.threat_range(group)
|
||||
if threat_range:
|
||||
ranges.append(threat_range.meters)
|
||||
return ranges
|
||||
return [self.tgo.threat_range(group).meters for group in self.tgo.groups]
|
||||
|
||||
@Property(list, notify=samDetectionRangesChanged)
|
||||
def samDetectionRanges(self) -> List[float]:
|
||||
if not self.tgo.might_have_aa:
|
||||
return []
|
||||
|
||||
ranges = []
|
||||
for group in self.tgo.groups:
|
||||
detection_range = self.tgo.detection_range(group)
|
||||
if detection_range:
|
||||
ranges.append(detection_range.meters)
|
||||
return ranges
|
||||
return [self.tgo.detection_range(group).meters for group in self.tgo.groups]
|
||||
|
||||
Reference in New Issue
Block a user