mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Move mission generation code into game.
Operation has been renamed MissionGenerator and is no longer a static class.
This commit is contained in:
@@ -16,7 +16,7 @@ class FlightType(Enum):
|
||||
|
||||
* flightplan.py: Add waypoint population in generate_flight_plan. Add a new flight
|
||||
plan type if necessary, though most are a subclass of StrikeFlightPlan.
|
||||
* aircraft.py: Add a configuration method and call it in setup_flight_group. This is
|
||||
* aircraftgenerator.py: Add a configuration method and call it in setup_flight_group. This is
|
||||
responsible for configuring waypoint 0 actions like setting ROE, threat reaction,
|
||||
and mission abort parameters (winchester, bingo, etc).
|
||||
* Implementations of MissionTarget.mission_types: A mission type can only be planned
|
||||
@@ -28,7 +28,7 @@ class FlightType(Enum):
|
||||
You may also need to update:
|
||||
|
||||
* flightwaypointtype.py: Add a new waypoint type if necessary. Most mission types
|
||||
will need these, as aircraft.py uses the ingress point type to specialize AI
|
||||
will need these, as aircraftgenerator.py uses the ingress point type to specialize AI
|
||||
tasks, and non-strike-like missions will need more specialized control.
|
||||
* ai_flight_planner.py: Use the new mission type in propose_missions so the AI will
|
||||
plan the new mission type.
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from typing import Optional, Sequence, Union
|
||||
from typing import Optional, Sequence, TYPE_CHECKING, Union
|
||||
|
||||
from dcs import Point
|
||||
from dcs.point import MovingPoint, PointAction
|
||||
from dcs.unit import Unit
|
||||
|
||||
from game.theater import ControlPoint, MissionTarget
|
||||
from game.utils import Distance, meters
|
||||
from game.ato.flightwaypointtype import FlightWaypointType
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.theater import ControlPoint, MissionTarget
|
||||
|
||||
|
||||
class FlightWaypoint:
|
||||
def __init__(
|
||||
|
||||
@@ -12,7 +12,7 @@ class FlightWaypointType(Enum):
|
||||
* waypointbuilder.py: Add a builder to simplify construction of the new waypoint
|
||||
type unless the new waypoint type will be a parameter to an existing builder
|
||||
method (such as how escort ingress waypoints work).
|
||||
* aircraft.py: Associate AI actions with the new waypoint type by subclassing
|
||||
* aircraftgenerator.py: Associate AI actions with the new waypoint type by subclassing
|
||||
PydcsWaypointBuilder and using it in PydcsWaypointBuilder.for_waypoint.
|
||||
"""
|
||||
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from collections import defaultdict
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import timedelta
|
||||
from typing import List, Optional, Dict
|
||||
from typing import List, Optional, Dict, TYPE_CHECKING
|
||||
|
||||
from game.ato import Flight, FlightType
|
||||
from game.ato.packagewaypoints import PackageWaypoints
|
||||
from game.theater import MissionTarget
|
||||
from game.utils import Speed
|
||||
from gen.flights.flightplan import FormationFlightPlan
|
||||
from gen.flights.traveltime import TotEstimator
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.theater import MissionTarget
|
||||
|
||||
|
||||
@dataclass
|
||||
class Package:
|
||||
|
||||
Reference in New Issue
Block a user