mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Finish moving gen into game.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import logging
|
||||
from datetime import datetime
|
||||
from typing import Any, Optional
|
||||
|
||||
from dcs.task import (
|
||||
@@ -24,7 +23,7 @@ from dcs.task import (
|
||||
from dcs.unitgroup import FlyingGroup
|
||||
|
||||
from game.ato import Flight, FlightType
|
||||
from gen.flights.flightplan import AwacsFlightPlan, RefuelingFlightPlan
|
||||
from game.ato.flightplan import AwacsFlightPlan, RefuelingFlightPlan
|
||||
|
||||
|
||||
class AircraftBehavior:
|
||||
|
||||
@@ -21,13 +21,13 @@ from game.missiongenerator.airsupport import AirSupport
|
||||
from game.missiongenerator.lasercoderegistry import LaserCodeRegistry
|
||||
from game.radio.radios import RadioRegistry
|
||||
from game.radio.tacan import TacanRegistry
|
||||
from game.runways import RunwayData
|
||||
from game.settings import Settings
|
||||
from game.theater.controlpoint import (
|
||||
Airfield,
|
||||
ControlPoint,
|
||||
)
|
||||
from game.unitmap import UnitMap
|
||||
from gen.runways import RunwayData
|
||||
from .aircraftpainter import AircraftPainter
|
||||
from .flightdata import FlightData
|
||||
from .flightgroupconfigurator import FlightGroupConfigurator
|
||||
|
||||
@@ -6,13 +6,13 @@ from typing import Optional, TYPE_CHECKING
|
||||
|
||||
from dcs.flyingunit import FlyingUnit
|
||||
|
||||
from gen.callsigns import create_group_callsign_from_unit
|
||||
from game.callsigns import create_group_callsign_from_unit
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.ato import FlightType, FlightWaypoint, Package
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.radio.radios import RadioFrequency
|
||||
from gen.runways import RunwayData
|
||||
from game.runways import RunwayData
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
|
||||
@@ -11,15 +11,15 @@ from dcs.unit import Skill
|
||||
from dcs.unitgroup import FlyingGroup
|
||||
|
||||
from game.ato import Flight, FlightType
|
||||
from game.callsigns import callsign_for_support_unit
|
||||
from game.data.weapons import Pylon, WeaponType as WeaponTypeEnum
|
||||
from game.missiongenerator.airsupport import AirSupport, AwacsInfo, TankerInfo
|
||||
from game.missiongenerator.lasercoderegistry import LaserCodeRegistry
|
||||
from game.radio.radios import RadioFrequency, RadioRegistry
|
||||
from game.radio.tacan import TacanBand, TacanRegistry, TacanUsage
|
||||
from game.runways import RunwayData
|
||||
from game.squadrons import Pilot
|
||||
from gen.callsigns import callsign_for_support_unit
|
||||
from gen.flights.flightplan import AwacsFlightPlan, RefuelingFlightPlan
|
||||
from gen.runways import RunwayData
|
||||
from game.ato.flightplan import AwacsFlightPlan, RefuelingFlightPlan
|
||||
from .aircraftbehavior import AircraftBehavior
|
||||
from .aircraftpainter import AircraftPainter
|
||||
from .flightdata import FlightData
|
||||
|
||||
@@ -15,10 +15,10 @@ from dcs.unitgroup import FlyingGroup, ShipGroup, StaticGroup
|
||||
from game.ato import Flight
|
||||
from game.ato.flightstate import InFlight
|
||||
from game.ato.starttype import StartType
|
||||
from game.naming import namegen
|
||||
from game.theater import Airfield, ControlPoint, Fob, NavalControlPoint, OffMapSpawn
|
||||
from game.utils import feet, meters
|
||||
from gen.flights.traveltime import GroundSpeed
|
||||
from gen.naming import namegen
|
||||
from game.ato.traveltime import GroundSpeed
|
||||
|
||||
WARM_START_HELI_ALT = meters(500)
|
||||
WARM_START_ALTITUDE = meters(3000)
|
||||
|
||||
@@ -4,7 +4,7 @@ from dcs.point import MovingPoint
|
||||
from dcs.task import EngageTargets, EngageTargetsInZone, Targets
|
||||
|
||||
from game.utils import nautical_miles
|
||||
from gen.flights.flightplan import CasFlightPlan
|
||||
from game.ato.flightplan import CasFlightPlan
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import logging
|
||||
from dcs.point import MovingPoint
|
||||
from dcs.task import ControlledTask, OptFormation, OrbitAction
|
||||
|
||||
from gen.flights.flightplan import LoiterFlightPlan
|
||||
from game.ato.flightplan import LoiterFlightPlan
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ from dcs.task import (
|
||||
)
|
||||
|
||||
from game.ato import FlightType
|
||||
from gen.flights.flightplan import PatrollingFlightPlan
|
||||
from game.ato.flightplan import PatrollingFlightPlan
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import logging
|
||||
|
||||
from dcs.point import MovingPoint
|
||||
|
||||
from gen.flights.flightplan import PatrollingFlightPlan
|
||||
from game.ato.flightplan import PatrollingFlightPlan
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from dcs.point import MovingPoint
|
||||
from dcs.task import EngageTargets, OptFormation, Targets
|
||||
|
||||
from game.utils import nautical_miles
|
||||
from gen.flights.flightplan import SweepFlightPlan
|
||||
from game.ato.flightplan import SweepFlightPlan
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
from typing import List, Type, Tuple, TYPE_CHECKING
|
||||
from typing import List, TYPE_CHECKING, Tuple, Type
|
||||
|
||||
from dcs.mission import Mission, StartType
|
||||
from dcs.planes import IL_78M, KC130, KC135MPRS, KC_135, PlaneType
|
||||
@@ -15,14 +15,13 @@ from dcs.task import (
|
||||
)
|
||||
from dcs.unittype import UnitType
|
||||
|
||||
from game.utils import Heading
|
||||
from gen.callsigns import callsign_for_support_unit
|
||||
from gen.flights.ai_flight_planner_db import AEWC_CAPABLE
|
||||
from gen.naming import namegen
|
||||
from game.callsigns import callsign_for_support_unit
|
||||
from game.naming import namegen
|
||||
from game.radio.radios import RadioRegistry
|
||||
from game.radio.tacan import TacanBand, TacanRegistry, TacanUsage
|
||||
|
||||
from .airsupport import AirSupport, TankerInfo, AwacsInfo
|
||||
from game.utils import Heading
|
||||
from game.ato.ai_flight_planner_db import AEWC_CAPABLE
|
||||
from .airsupport import AirSupport, AwacsInfo, TankerInfo
|
||||
from .frontlineconflictdescription import FrontLineConflictDescription
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -11,17 +11,15 @@ from typing import Dict, List, TYPE_CHECKING
|
||||
from dcs.mission import Mission
|
||||
from jinja2 import Environment, FileSystemLoader, select_autoescape
|
||||
|
||||
from game.theater import ControlPoint, FrontLine
|
||||
from game.ato.flightwaypoint import FlightWaypoint
|
||||
from gen.ground_forces.combat_stance import CombatStance
|
||||
from game.ground_forces.combat_stance import CombatStance
|
||||
from game.radio.radios import RadioFrequency
|
||||
from gen.runways import RunwayData
|
||||
|
||||
from game.runways import RunwayData
|
||||
from game.theater import ControlPoint, FrontLine
|
||||
from .aircraft.flightdata import FlightData
|
||||
from .airsupportgenerator import AwacsInfo, TankerInfo
|
||||
from .flotgenerator import JtacInfo
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import logging
|
||||
import math
|
||||
import random
|
||||
from typing import TYPE_CHECKING, List, Optional, Tuple
|
||||
from typing import List, Optional, TYPE_CHECKING, Tuple
|
||||
|
||||
from dcs import Mission
|
||||
from dcs.action import AITaskPush
|
||||
@@ -13,9 +13,9 @@ from dcs.mapping import Point
|
||||
from dcs.point import PointAction
|
||||
from dcs.task import (
|
||||
AFAC,
|
||||
EPLRS,
|
||||
AttackGroup,
|
||||
ControlledTask,
|
||||
EPLRS,
|
||||
FAC,
|
||||
FireAtPoint,
|
||||
GoToWaypoint,
|
||||
@@ -25,25 +25,24 @@ from dcs.task import (
|
||||
SetInvisibleCommand,
|
||||
)
|
||||
from dcs.triggers import Event, TriggerOnce
|
||||
from dcs.unit import Vehicle, Skill
|
||||
from dcs.unit import Skill, Vehicle
|
||||
from dcs.unitgroup import VehicleGroup
|
||||
|
||||
from game.callsigns import callsign_for_support_unit
|
||||
from game.data.units import UnitClass
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.dcs.groundunittype import GroundUnitType
|
||||
from game.ground_forces.ai_ground_planner import (
|
||||
CombatGroup,
|
||||
CombatGroupRole,
|
||||
DISTANCE_FROM_FRONTLINE,
|
||||
)
|
||||
from game.ground_forces.combat_stance import CombatStance
|
||||
from game.naming import namegen
|
||||
from game.radio.radios import RadioRegistry
|
||||
from game.theater.controlpoint import ControlPoint
|
||||
from game.unitmap import UnitMap
|
||||
from game.utils import Heading
|
||||
from gen.ground_forces.ai_ground_planner import (
|
||||
DISTANCE_FROM_FRONTLINE,
|
||||
CombatGroup,
|
||||
CombatGroupRole,
|
||||
)
|
||||
from gen.callsigns import callsign_for_support_unit
|
||||
from gen.ground_forces.combat_stance import CombatStance
|
||||
from gen.naming import namegen
|
||||
from game.radio.radios import RadioRegistry
|
||||
|
||||
from .airsupport import AirSupport, JtacInfo
|
||||
from .frontlineconflictdescription import FrontLineConflictDescription
|
||||
from .lasercoderegistry import LaserCodeRegistry
|
||||
|
||||
@@ -40,15 +40,14 @@ from game.ato.flightwaypointtype import FlightWaypointType
|
||||
from game.data.alic import AlicCodes
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.radio.radios import RadioFrequency
|
||||
from game.runways import RunwayData
|
||||
from game.theater import ConflictTheater, LatLon, TheaterGroundObject, TheaterUnit
|
||||
from game.theater.bullseye import Bullseye
|
||||
from game.utils import Distance, UnitSystem, meters, mps, pounds
|
||||
from game.weather import Weather
|
||||
from gen.runways import RunwayData
|
||||
from .aircraft.flightdata import FlightData
|
||||
from .airsupportgenerator import AwacsInfo, TankerInfo
|
||||
from .briefinggenerator import CommInfo, JtacInfo, MissionInfoGenerator
|
||||
from ..dcs.helpers import unit_type_from_name
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
||||
@@ -10,17 +10,17 @@ from dcs import Mission, Point
|
||||
from dcs.coalition import Coalition
|
||||
from dcs.countries import country_dict
|
||||
|
||||
from game.airfields import AirfieldData
|
||||
from game.dcs.helpers import unit_type_from_name
|
||||
from game.missiongenerator.aircraft.aircraftgenerator import (
|
||||
AircraftGenerator,
|
||||
)
|
||||
from game.naming import namegen
|
||||
from game.radio.radios import RadioFrequency, RadioRegistry
|
||||
from game.radio.tacan import TacanRegistry
|
||||
from game.theater import Airfield, FrontLine
|
||||
from game.theater.bullseye import Bullseye
|
||||
from game.unitmap import UnitMap
|
||||
from gen.airfields import AirfieldData
|
||||
from gen.naming import namegen
|
||||
from .aircraft.flightdata import FlightData
|
||||
from .airsupport import AirSupport
|
||||
from .airsupportgenerator import AirSupportGenerator
|
||||
|
||||
@@ -43,6 +43,7 @@ from dcs.vehicles import vehicle_map
|
||||
|
||||
from game.radio.radios import RadioFrequency, RadioRegistry
|
||||
from game.radio.tacan import TacanBand, TacanChannel, TacanRegistry, TacanUsage
|
||||
from game.runways import RunwayData
|
||||
from game.theater import ControlPoint, TheaterGroundObject, TheaterUnit
|
||||
from game.theater.theatergroundobject import (
|
||||
CarrierGroundObject,
|
||||
@@ -53,7 +54,6 @@ from game.theater.theatergroundobject import (
|
||||
from game.theater.theatergroup import SceneryUnit, TheaterGroup
|
||||
from game.unitmap import UnitMap
|
||||
from game.utils import Heading, feet, knots, mps
|
||||
from gen.runways import RunwayData
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
||||
Reference in New Issue
Block a user