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:
RndName 2022-02-26 22:31:01 +01:00
parent 2585dcc130
commit 762bc328e1
No known key found for this signature in database
GPG Key ID: 5EF516FD9537F7C0
2 changed files with 5 additions and 17 deletions

View File

@ -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]

View File

@ -1,4 +1,4 @@
class: SHORAD
class: Logistics
description: "The 9K33 Osa (Russian: 9\u041A33 \xAB\u041E\u0441\u0430\xBB, literally\
\ \"wasp\"; NATO reporting name SA-8 Gecko) is a highly mobile, low-altitude, short-range\
\ tactical surface-to-air missile system developed in the Soviet Union in the 1960s\
@ -6,7 +6,7 @@ description: "The 9K33 Osa (Russian: 9\u041A33 \xAB\u041E\u0441\u0430\xBB, liter
introduced: 1981
manufacturer: Ulyanovsk
origin: USSR/Russia
price: 22
price: 3
role: Self-Propelled Surface-to-Air Missile Launcher
variants:
SA-13 Gopher (9K35 Strela-10M3): {}
SAM SA-8 Osa LD 9T217: {}