mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add fidelity for SIDC status of TGOs.
The new behavior is as follows for SAMs: No damaged units: fully capable (green) Damaged but still operational: present (no bar) Not fully destroyed but inoperable: damaged (yellow) Fully destroyed: destroyed (red) And for all other TGOs: Fully destroyed: destroyed (red) Any missing units: damaged (yellow) No missing units: present (no bar) Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2438.
This commit is contained in:
parent
d6bd5184b6
commit
d14b964f1d
@ -85,7 +85,12 @@ class TheaterGroundObject(MissionTarget, SidcDescribable, ABC):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def sidc_status(self) -> Status:
|
def sidc_status(self) -> Status:
|
||||||
return Status.PRESENT_DESTROYED if self.is_dead else Status.PRESENT
|
if self.is_dead:
|
||||||
|
return Status.PRESENT_DESTROYED
|
||||||
|
elif self.dead_units:
|
||||||
|
return Status.PRESENT_DAMAGED
|
||||||
|
else:
|
||||||
|
return Status.PRESENT
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def standard_identity(self) -> StandardIdentity:
|
def standard_identity(self) -> StandardIdentity:
|
||||||
@ -524,9 +529,13 @@ class SamGroundObject(IadsGroundObject):
|
|||||||
def sidc_status(self) -> Status:
|
def sidc_status(self) -> Status:
|
||||||
if self.is_dead:
|
if self.is_dead:
|
||||||
return Status.PRESENT_DESTROYED
|
return Status.PRESENT_DESTROYED
|
||||||
if self.max_threat_range() > meters(0):
|
elif self.dead_units:
|
||||||
return Status.PRESENT
|
if self.max_threat_range() > meters(0):
|
||||||
return Status.PRESENT_DAMAGED
|
return Status.PRESENT
|
||||||
|
else:
|
||||||
|
return Status.PRESENT_DAMAGED
|
||||||
|
else:
|
||||||
|
return Status.PRESENT_FULLY_CAPABLE
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def symbol_set_and_entity(self) -> tuple[SymbolSet, Entity]:
|
def symbol_set_and_entity(self) -> tuple[SymbolSet, Entity]:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user