mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Update heading and iads state of TGO after capture
This commit is contained in:
parent
9e3edd7208
commit
2d39fb496c
@ -63,7 +63,9 @@ from .frontline import FrontLine
|
|||||||
from .missiontarget import MissionTarget
|
from .missiontarget import MissionTarget
|
||||||
from .theatergroundobject import (
|
from .theatergroundobject import (
|
||||||
GenericCarrierGroundObject,
|
GenericCarrierGroundObject,
|
||||||
|
IadsGroundObject,
|
||||||
TheaterGroundObject,
|
TheaterGroundObject,
|
||||||
|
VehicleGroupGroundObject,
|
||||||
)
|
)
|
||||||
from .theatergroup import TheaterUnit
|
from .theatergroup import TheaterUnit
|
||||||
from ..ato.starttype import StartType
|
from ..ato.starttype import StartType
|
||||||
@ -828,18 +830,24 @@ class ControlPoint(MissionTarget, SidcDescribable, ABC):
|
|||||||
self.retreat_ground_units(game)
|
self.retreat_ground_units(game)
|
||||||
self.retreat_air_units(game)
|
self.retreat_air_units(game)
|
||||||
self.depopulate_uncapturable_tgos()
|
self.depopulate_uncapturable_tgos()
|
||||||
|
|
||||||
# All the attached TGOs have either been depopulated or captured. Tell the UI to
|
|
||||||
# update their state.
|
|
||||||
for tgo in self.connected_objectives:
|
|
||||||
events.update_tgo(tgo)
|
|
||||||
|
|
||||||
self._coalition = new_coalition
|
self._coalition = new_coalition
|
||||||
self.base.set_strength_to_minimum()
|
self.base.set_strength_to_minimum()
|
||||||
self._clear_front_lines(events)
|
self._clear_front_lines(events)
|
||||||
self._create_missing_front_lines(events)
|
self._create_missing_front_lines(events)
|
||||||
events.update_control_point(self)
|
events.update_control_point(self)
|
||||||
|
|
||||||
|
# All the attached TGOs have either been depopulated or captured. Tell the UI to
|
||||||
|
# update their state. Also update orientation and IADS state for specific tgos
|
||||||
|
for tgo in self.connected_objectives:
|
||||||
|
if isinstance(tgo, IadsGroundObject) or isinstance(
|
||||||
|
tgo, VehicleGroupGroundObject
|
||||||
|
):
|
||||||
|
if isinstance(tgo, IadsGroundObject):
|
||||||
|
game.theater.iads_network.update_tgo(tgo)
|
||||||
|
conflict_heading = game.theater.heading_to_conflict_from(tgo.position)
|
||||||
|
tgo.rotate(conflict_heading or tgo.heading)
|
||||||
|
events.update_tgo(tgo)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def required_aircraft_start_type(self) -> Optional[StartType]:
|
def required_aircraft_start_type(self) -> Optional[StartType]:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user