mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Allow hiding IADS TGOs on MFD
This commit is contained in:
@@ -223,3 +223,4 @@ class Migrator:
|
||||
def _update_tgos(self) -> None:
|
||||
for go in self.game.theater.ground_objects:
|
||||
try_set_attr(go, "task", None)
|
||||
try_set_attr(go, "hide_on_mfd", False)
|
||||
|
||||
@@ -290,9 +290,11 @@ class GroundObjectGenerator:
|
||||
# All alive Ships
|
||||
ship_units.append(unit)
|
||||
if vehicle_units:
|
||||
self.create_vehicle_group(group.group_name, vehicle_units)
|
||||
vg = self.create_vehicle_group(group.group_name, vehicle_units)
|
||||
vg.hidden_on_mfd = self.ground_object.hide_on_mfd
|
||||
if ship_units:
|
||||
self.create_ship_group(group.group_name, ship_units)
|
||||
sg = self.create_ship_group(group.group_name, ship_units)
|
||||
sg.hidden_on_mfd = self.ground_object.hide_on_mfd
|
||||
|
||||
def create_vehicle_group(
|
||||
self, group_name: str, units: list[TheaterUnit]
|
||||
|
||||
@@ -64,6 +64,7 @@ class TheaterGroundObject(MissionTarget, SidcDescribable, ABC):
|
||||
control_point: ControlPoint,
|
||||
sea_object: bool,
|
||||
task: Optional[GroupTask],
|
||||
hide_on_mfd: bool = False,
|
||||
) -> None:
|
||||
super().__init__(name, location)
|
||||
self.id = uuid.uuid4()
|
||||
@@ -75,6 +76,7 @@ class TheaterGroundObject(MissionTarget, SidcDescribable, ABC):
|
||||
self.original_name = location.original_name
|
||||
self._threat_poly: ThreatPoly | None = None
|
||||
self.task = task
|
||||
self.hide_on_mfd = hide_on_mfd
|
||||
|
||||
def __getstate__(self) -> dict[str, Any]:
|
||||
state = self.__dict__.copy()
|
||||
|
||||
Reference in New Issue
Block a user