mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Rename OCA strike tasks.
This commit is contained in:
@@ -163,9 +163,9 @@ class AircraftAllocator:
|
||||
return CAS_PREFERRED
|
||||
elif task in (FlightType.DEAD, FlightType.SEAD):
|
||||
return SEAD_PREFERRED
|
||||
elif task == FlightType.OCA_STRIKE:
|
||||
elif task == FlightType.OCA_AIRCRAFT:
|
||||
return CAS_PREFERRED
|
||||
elif task == FlightType.RUNWAY_ATTACK:
|
||||
elif task == FlightType.OCA_RUNWAY:
|
||||
return RUNWAY_ATTACK_PREFERRED
|
||||
elif task == FlightType.STRIKE:
|
||||
return STRIKE_PREFERRED
|
||||
@@ -187,9 +187,9 @@ class AircraftAllocator:
|
||||
return CAS_CAPABLE
|
||||
elif task in (FlightType.DEAD, FlightType.SEAD):
|
||||
return SEAD_CAPABLE
|
||||
elif task == FlightType.OCA_STRIKE:
|
||||
elif task == FlightType.OCA_AIRCRAFT:
|
||||
return CAS_CAPABLE
|
||||
elif task == FlightType.RUNWAY_ATTACK:
|
||||
elif task == FlightType.OCA_RUNWAY:
|
||||
return RUNWAY_ATTACK_CAPABLE
|
||||
elif task == FlightType.STRIKE:
|
||||
return STRIKE_CAPABLE
|
||||
@@ -569,8 +569,8 @@ class CoalitionMissionPlanner:
|
||||
|
||||
for target in self.objective_finder.oca_targets(min_aircraft=20):
|
||||
yield ProposedMission(target, [
|
||||
ProposedFlight(FlightType.OCA_STRIKE, 2, self.MAX_OCA_RANGE),
|
||||
ProposedFlight(FlightType.RUNWAY_ATTACK, 2, self.MAX_OCA_RANGE),
|
||||
ProposedFlight(FlightType.OCA_AIRCRAFT, 2, self.MAX_OCA_RANGE),
|
||||
ProposedFlight(FlightType.OCA_RUNWAY, 2, self.MAX_OCA_RANGE),
|
||||
# TODO: Max escort range.
|
||||
ProposedFlight(FlightType.ESCORT, 2, self.MAX_OCA_RANGE),
|
||||
ProposedFlight(FlightType.SEAD, 2, self.MAX_OCA_RANGE),
|
||||
|
||||
@@ -28,8 +28,8 @@ class FlightType(Enum):
|
||||
ESCORT = "Escort"
|
||||
BAI = "BAI"
|
||||
SWEEP = "Fighter sweep"
|
||||
RUNWAY_ATTACK = "Runway attack"
|
||||
OCA_STRIKE = "OCA Strike"
|
||||
OCA_RUNWAY = "OCA/Runway"
|
||||
OCA_AIRCRAFT = "OCA/Aircraft"
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.value
|
||||
@@ -60,8 +60,8 @@ class FlightWaypointType(Enum):
|
||||
INGRESS_SWEEP = 21
|
||||
INGRESS_BAI = 22
|
||||
DIVERT = 23
|
||||
INGRESS_RUNWAY_BOMBING = 24
|
||||
INGRESS_OCA_STRIKE = 25
|
||||
INGRESS_OCA_RUNWAY = 24
|
||||
INGRESS_OCA_AIRCRAFT = 25
|
||||
|
||||
|
||||
class FlightWaypoint:
|
||||
|
||||
@@ -649,9 +649,9 @@ class FlightPlanBuilder:
|
||||
return self.generate_dead(flight, custom_targets)
|
||||
elif task == FlightType.ESCORT:
|
||||
return self.generate_escort(flight)
|
||||
elif task == FlightType.OCA_STRIKE:
|
||||
elif task == FlightType.OCA_AIRCRAFT:
|
||||
return self.generate_oca_strike(flight)
|
||||
elif task == FlightType.RUNWAY_ATTACK:
|
||||
elif task == FlightType.OCA_RUNWAY:
|
||||
return self.generate_runway_attack(flight)
|
||||
elif task == FlightType.SEAD:
|
||||
return self.generate_sead(flight, custom_targets)
|
||||
@@ -964,7 +964,7 @@ class FlightPlanBuilder:
|
||||
raise InvalidObjectiveLocation(flight.flight_type, location)
|
||||
|
||||
return self.strike_flightplan(flight, location,
|
||||
FlightWaypointType.INGRESS_OCA_STRIKE)
|
||||
FlightWaypointType.INGRESS_OCA_AIRCRAFT)
|
||||
|
||||
def generate_runway_attack(self, flight: Flight) -> StrikeFlightPlan:
|
||||
"""Generate a runway attack flight plan at a given location.
|
||||
@@ -981,7 +981,7 @@ class FlightPlanBuilder:
|
||||
raise InvalidObjectiveLocation(flight.flight_type, location)
|
||||
|
||||
return self.strike_flightplan(flight, location,
|
||||
FlightWaypointType.INGRESS_RUNWAY_BOMBING)
|
||||
FlightWaypointType.INGRESS_OCA_RUNWAY)
|
||||
|
||||
def generate_sead(self, flight: Flight,
|
||||
custom_targets: Optional[List[Unit]]) -> StrikeFlightPlan:
|
||||
@@ -1079,7 +1079,7 @@ class FlightPlanBuilder:
|
||||
return builder.dead_area(location)
|
||||
elif flight.flight_type == FlightType.SEAD:
|
||||
return builder.sead_area(location)
|
||||
elif flight.flight_type == FlightType.OCA_STRIKE:
|
||||
elif flight.flight_type == FlightType.OCA_AIRCRAFT:
|
||||
return builder.oca_strike_area(location)
|
||||
else:
|
||||
return builder.strike_area(location)
|
||||
|
||||
Reference in New Issue
Block a user