mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Disband squadrons sinking with ship + Sink/Resurrect cheat
This commit is contained in:
@@ -283,6 +283,10 @@ class TheaterGroundObject(MissionTarget, SidcDescribable, ABC):
|
||||
def coalition(self) -> Coalition:
|
||||
return self.control_point.coalition
|
||||
|
||||
@property
|
||||
def is_naval_control_point(self) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
class BuildingGroundObject(TheaterGroundObject):
|
||||
def __init__(
|
||||
@@ -384,6 +388,10 @@ class GenericCarrierGroundObject(NavalGroundObject, ABC):
|
||||
def is_control_point(self) -> bool:
|
||||
return True
|
||||
|
||||
@property
|
||||
def is_naval_control_point(self) -> bool:
|
||||
return True
|
||||
|
||||
|
||||
# TODO: Why is this both a CP and a TGO?
|
||||
class CarrierGroundObject(GenericCarrierGroundObject):
|
||||
|
||||
@@ -66,6 +66,18 @@ class TheaterUnit:
|
||||
if self.ground_object.is_iads:
|
||||
iads = self.ground_object.control_point.coalition.game.theater.iads_network
|
||||
iads.update_tgo(self.ground_object, events)
|
||||
if self.ground_object.is_naval_control_point:
|
||||
cp = self.ground_object.control_point
|
||||
for squadron in cp.squadrons:
|
||||
cp.coalition.air_wing.squadrons[squadron.aircraft].remove(squadron)
|
||||
|
||||
def revive(self, events: GameUpdateEvents) -> None:
|
||||
self.alive = True
|
||||
self.ground_object.threat_poly()
|
||||
events.update_tgo(self.ground_object)
|
||||
if self.ground_object.is_iads:
|
||||
iads = self.ground_object.control_point.coalition.game.theater.iads_network
|
||||
iads.update_tgo(self.ground_object, events)
|
||||
|
||||
@property
|
||||
def unit_name(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user