mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Restored TheaterGroundObject handling in antishipingress.py
Restores handling of TheaterGroundObject targets in antishipingress.py This is needed when anti-ship missions are planned against other ship groups than NavalControlPoints (carrier groups or LHA strike groups).
This commit is contained in:
parent
a5083e3e1f
commit
861ed584df
@ -3,7 +3,7 @@ import logging
|
||||
from dcs.point import MovingPoint
|
||||
from dcs.task import AttackGroup, OptFormation, WeaponType
|
||||
|
||||
from game.theater import NavalControlPoint
|
||||
from game.theater import NavalControlPoint, TheaterGroundObject
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
@ -17,6 +17,9 @@ class AntiShipIngressBuilder(PydcsWaypointBuilder):
|
||||
carrier_name = target.get_carrier_group_name()
|
||||
if carrier_name:
|
||||
group_names.append(carrier_name)
|
||||
elif isinstance(target, TheaterGroundObject):
|
||||
for group in target.groups:
|
||||
group_names.append(group.group_name)
|
||||
else:
|
||||
logging.error(
|
||||
"Unexpected target type for Anti-Ship mission: %s",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user