mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Issue 3337 (#3356)
This PR addresses #3337 by: - Updating the UI to identify that a destroyed carrier/LHA as "Sunk" - Fall back on targeting other groups in the NavalControlPoint (e.g. escorts if present) if the carrier/LHA is sunk.
This commit is contained in:
@@ -20,8 +20,14 @@ class AntiShipIngressBuilder(PydcsWaypointBuilder):
|
||||
group_names.append(target.name)
|
||||
elif isinstance(target, NavalControlPoint):
|
||||
carrier_name = target.get_carrier_group_name()
|
||||
if carrier_name:
|
||||
if carrier_name and self.mission.find_group(
|
||||
carrier_name
|
||||
): # Found a carrier, target it.
|
||||
group_names.append(carrier_name)
|
||||
else: # Could not find carrier/LHA, indicating it was sunk. Target other groups if present e.g. escorts.
|
||||
for ground_object in target.ground_objects:
|
||||
for group in ground_object.groups:
|
||||
group_names.append(group.group_name)
|
||||
else:
|
||||
logging.error(
|
||||
"Unexpected target type for anti-ship mission: %s",
|
||||
|
||||
@@ -1283,7 +1283,10 @@ class NavalControlPoint(ControlPoint, ABC):
|
||||
return RunwayStatus(damaged=not self.runway_is_operational())
|
||||
|
||||
def describe_runway_status(self) -> str:
|
||||
return f"Flight deck {self.runway_status.describe()}"
|
||||
if self.runway_is_operational():
|
||||
return f"Flight deck {self.runway_status.describe()}"
|
||||
# Special handling for not operational carriers/LHAs
|
||||
return f"Sunk"
|
||||
|
||||
@property
|
||||
def runway_can_be_repaired(self) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user