Include SEAD Sweep in common escorts

This commit is contained in:
Raffson 2023-07-10 22:04:39 +02:00
parent f76c8a80b5
commit 17211e1597
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
3 changed files with 4 additions and 5 deletions

View File

@ -2,10 +2,10 @@ from __future__ import annotations
import itertools
import operator
import random
from abc import abstractmethod
from dataclasses import dataclass, field
from enum import IntEnum, auto, unique
import random
from typing import Generic, Iterator, Optional, TYPE_CHECKING, TypeVar, Union
from game.ato.flighttype import FlightType
@ -112,6 +112,7 @@ class PackagePlanningTask(TheaterCommanderTask, Generic[MissionTargetT]):
def propose_common_escorts(self) -> None:
self.propose_flight(FlightType.SEAD_ESCORT, 2, EscortType.Sead)
self.propose_flight(FlightType.ESCORT, 2, EscortType.AirToAir)
self.propose_flight(FlightType.SEAD_SWEEP, 2, EscortType.Sead)
def iter_iads_ranges(
self, state: TheaterState, range_type: RangeType

View File

@ -1,7 +1,6 @@
from __future__ import annotations
from dataclasses import dataclass
from random import randint
from game.ato.flighttype import FlightType
from game.commander.tasks.packageplanningtask import PackagePlanningTask
@ -33,3 +32,4 @@ class PlanCas(PackagePlanningTask[FrontLine]):
size = self.get_flight_size()
self.propose_flight(FlightType.CAS, size)
self.propose_flight(FlightType.TARCAP, 2)
self.propose_flight(FlightType.SEAD_SWEEP, 2)

View File

@ -3,7 +3,6 @@ from __future__ import annotations
from dataclasses import dataclass
from game.ato.flighttype import FlightType
from game.commander.missionproposals import EscortType
from game.commander.tasks.packageplanningtask import PackagePlanningTask
from game.commander.theaterstate import TheaterState
from game.theater.theatergroundobject import IadsGroundObject
@ -42,7 +41,6 @@ class PlanDead(PackagePlanningTask[IadsGroundObject]):
# needs a decent refactor to the escort planning to do so.
if self.target.has_live_radar_sam:
self.propose_flight(FlightType.SEAD, 2)
self.propose_flight(FlightType.SEAD_ESCORT, 2, EscortType.Sead)
self.propose_flight(FlightType.ESCORT, 2, EscortType.AirToAir)
self.propose_common_escorts()
if self.target.control_point.coalition.game.settings.autoplan_tankers_for_dead:
self.propose_flight(FlightType.REFUELING, 1)