mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Initial implementation of AEW&C missions.
Still a work in progress (the missions don't actually perform their task, just orbit). Currently: * AEW&C aircraft can be bought. * AEW&C missions can be planned at any control point and at front lines. * AEW&C will return after 4H or Bingo.
This commit is contained in:
committed by
Simon Clark
parent
4a0ccc4c2f
commit
e0501e46e3
@@ -1117,7 +1117,8 @@ COMMON_OVERRIDE = {
|
||||
GroundAttack: "STRIKE",
|
||||
Escort: "CAP",
|
||||
RunwayAttack: "RUNWAY_ATTACK",
|
||||
FighterSweep: "CAP"
|
||||
FighterSweep: "CAP",
|
||||
AWACS: "AEW&C",
|
||||
}
|
||||
|
||||
"""
|
||||
@@ -1328,6 +1329,7 @@ CARRIER_CAPABLE = [
|
||||
A_4E_C,
|
||||
Rafale_M,
|
||||
S_3B,
|
||||
E_2C,
|
||||
|
||||
UH_1H,
|
||||
Mi_8MT,
|
||||
|
||||
@@ -4,7 +4,7 @@ import math
|
||||
import typing
|
||||
from typing import Dict, Type
|
||||
|
||||
from dcs.task import CAP, CAS, Embarking, PinpointStrike, Task
|
||||
from dcs.task import AWACS, CAP, CAS, Embarking, PinpointStrike, Task
|
||||
from dcs.unittype import FlyingType, UnitType, VehicleType
|
||||
from dcs.vehicles import AirDefence, Armor
|
||||
|
||||
@@ -122,7 +122,7 @@ class Base:
|
||||
for_task = db.unit_task(unit_type)
|
||||
|
||||
target_dict = None
|
||||
if for_task == CAS or for_task == CAP or for_task == Embarking:
|
||||
if for_task == AWACS or for_task == CAS or for_task == CAP or for_task == Embarking:
|
||||
target_dict = self.aircraft
|
||||
elif for_task == PinpointStrike:
|
||||
target_dict = self.armor
|
||||
|
||||
@@ -812,6 +812,7 @@ class FrontLine(MissionTarget):
|
||||
def mission_types(self, for_player: bool) -> Iterator[FlightType]:
|
||||
yield from [
|
||||
FlightType.CAS,
|
||||
FlightType.AEWC,
|
||||
# TODO: FlightType.TROOP_TRANSPORT
|
||||
# TODO: FlightType.EVAC
|
||||
]
|
||||
|
||||
@@ -603,6 +603,14 @@ class ControlPoint(MissionTarget, ABC):
|
||||
def income_per_turn(self) -> int:
|
||||
return 0
|
||||
|
||||
def mission_types(self, for_player: bool) -> Iterator[FlightType]:
|
||||
from gen.flights.flight import FlightType
|
||||
if self.is_friendly(for_player):
|
||||
yield from [
|
||||
FlightType.AEWC,
|
||||
]
|
||||
yield from super().mission_types(for_player)
|
||||
|
||||
|
||||
class Airfield(ControlPoint):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user