mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add anti-ship missions.
The only practical difference between this and BAI is that the target is floating, so this mostly shares its implementation with BAI. Fixes https://github.com/Khopa/dcs_liberation/issues/350
This commit is contained in:
@@ -255,9 +255,7 @@ class ControlPoint(MissionTarget):
|
||||
]
|
||||
else:
|
||||
if self.is_fleet:
|
||||
yield from [
|
||||
# TODO: FlightType.ANTISHIP
|
||||
]
|
||||
yield FlightType.ANTISHIP
|
||||
else:
|
||||
yield from [
|
||||
# TODO: FlightType.STRIKE
|
||||
|
||||
@@ -156,7 +156,15 @@ class BuildingGroundObject(TheaterGroundObject):
|
||||
return f"{self.category}|{self.group_id}|{self.object_id}"
|
||||
|
||||
|
||||
class GenericCarrierGroundObject(TheaterGroundObject):
|
||||
class NavalGroundObject(TheaterGroundObject):
|
||||
def mission_types(self, for_player: bool) -> Iterator[FlightType]:
|
||||
from gen.flights.flight import FlightType
|
||||
if not self.is_friendly(for_player):
|
||||
yield FlightType.ANTISHIP
|
||||
yield from super().mission_types(for_player)
|
||||
|
||||
|
||||
class GenericCarrierGroundObject(NavalGroundObject):
|
||||
pass
|
||||
|
||||
|
||||
@@ -284,7 +292,7 @@ class EwrGroundObject(BaseDefenseGroundObject):
|
||||
return f"{self.faction_color}|{super().group_name}"
|
||||
|
||||
|
||||
class ShipGroundObject(TheaterGroundObject):
|
||||
class ShipGroundObject(NavalGroundObject):
|
||||
def __init__(self, name: str, group_id: int, position: Point,
|
||||
control_point: ControlPoint) -> None:
|
||||
super().__init__(
|
||||
|
||||
Reference in New Issue
Block a user