Convert to new unit APIs, remove old APIs.

There are probably plenty of raw ints around that never used the old
conversion APIs, but we'll just need to fix those when we see them.

Fixes https://github.com/Khopa/dcs_liberation/issues/558
This commit is contained in:
Dan Albert
2020-12-19 21:18:18 -08:00
parent 113947b9f0
commit 2ac818dcdd
18 changed files with 224 additions and 253 deletions

View File

@@ -6,11 +6,12 @@ import random
from typing import Iterator, List, Optional, TYPE_CHECKING, Type
from dcs.task import CAP, CAS
from dcs.unittype import FlyingType, UnitType, VehicleType
from dcs.unittype import FlyingType, VehicleType
from game import db
from game.factions.faction import Faction
from game.theater import ControlPoint, MissionTarget
from game.utils import Distance
from gen.flights.ai_flight_planner_db import (
capable_aircraft_for_task,
preferred_aircraft_for_task,
@@ -25,7 +26,7 @@ if TYPE_CHECKING:
@dataclass(frozen=True)
class AircraftProcurementRequest:
near: MissionTarget
range: int
range: Distance
task_capability: FlightType
number: int