Move theater into game.

This commit is contained in:
Dan Albert
2020-11-17 18:11:33 -08:00
parent 482bedd739
commit 8345063e84
41 changed files with 1363 additions and 1369 deletions

View File

@@ -84,7 +84,7 @@ from gen.flights.flight import (
from gen.radios import MHz, Radio, RadioFrequency, RadioRegistry, get_radio
from gen.runways import RunwayData
from theater import TheaterGroundObject
from theater.controlpoint import ControlPoint, ControlPointType
from game.theater.controlpoint import ControlPoint, ControlPointType
from .conflictgen import Conflict
from .flights.flightplan import (
CasFlightPlan,

View File

@@ -16,7 +16,7 @@ from typing import Dict, List, Optional
from dcs.mapping import Point
from theater.missiontarget import MissionTarget
from game.theater.missiontarget import MissionTarget
from .flights.flight import Flight, FlightType
from .flights.flightplan import FormationFlightPlan

View File

@@ -2,19 +2,18 @@
Briefing generation logic
"""
from __future__ import annotations
import os
import random
import logging
from dataclasses import dataclass
from theater import FrontLine
from typing import List, Dict, TYPE_CHECKING
from jinja2 import Environment, FileSystemLoader, select_autoescape
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 .aircraft import FlightData
from .airsupportgen import AwacsInfo, TankerInfo
from .armor import JtacInfo
from theater import ControlPoint
from .ground_forces.combat_stance import CombatStance
from .radios import RadioFrequency
from .runways import RunwayData

View File

@@ -14,7 +14,7 @@ from dcs.ships import (
from game.factions.faction import Faction
from gen.fleet.dd_group import DDGroupGenerator
from gen.sam.group_generator import ShipGroupGenerator
from theater.theatergroundobject import TheaterGroundObject
from game.theater.theatergroundobject import TheaterGroundObject
if TYPE_CHECKING:
from game.game import Game

View File

@@ -2,7 +2,7 @@ from __future__ import annotations
from typing import TYPE_CHECKING
from game.factions.faction import Faction
from theater.theatergroundobject import TheaterGroundObject
from game.theater.theatergroundobject import TheaterGroundObject
from gen.sam.group_generator import ShipGroupGenerator
from dcs.unittype import ShipType

View File

@@ -16,7 +16,7 @@ from dcs.ships import (
from gen.fleet.dd_group import DDGroupGenerator
from gen.sam.group_generator import ShipGroupGenerator
from game.factions.faction import Faction
from theater.theatergroundobject import TheaterGroundObject
from game.theater.theatergroundobject import TheaterGroundObject
if TYPE_CHECKING:

View File

@@ -55,7 +55,7 @@ from theater import (
)
# Avoid importing some types that cause circular imports unless type checking.
from theater.theatergroundobject import (
from game.theater.theatergroundobject import (
EwrGroundObject,
NavalGroundObject, VehicleGroupGroundObject,
)

View File

@@ -9,7 +9,7 @@ from dcs.point import MovingPoint, PointAction
from dcs.unittype import FlyingType
from game import db
from theater.controlpoint import ControlPoint, MissionTarget
from game.theater.controlpoint import ControlPoint, MissionTarget
if TYPE_CHECKING:
from gen.ato import Package

View File

@@ -27,7 +27,7 @@ from theater import (
SamGroundObject,
TheaterGroundObject,
)
from theater.theatergroundobject import EwrGroundObject
from game.theater.theatergroundobject import EwrGroundObject
from .closestairfields import ObjectiveDistanceCache
from .flight import Flight, FlightType, FlightWaypoint, FlightWaypointType
from .traveltime import GroundSpeed, TravelTime

View File

@@ -28,7 +28,7 @@ from game import db
from game.data.building_data import FORTIFICATION_UNITS, FORTIFICATION_UNITS_ID
from game.db import unit_type_from_name
from theater import ControlPoint, TheaterGroundObject
from theater.theatergroundobject import (
from game.theater.theatergroundobject import (
BuildingGroundObject, CarrierGroundObject,
GenericCarrierGroundObject,
LhaGroundObject, ShipGroundObject,

View File

@@ -2,7 +2,7 @@ from abc import ABC
from game import Game
from gen.sam.group_generator import GroupGenerator
from theater.theatergroundobject import SamGroundObject
from game.theater.theatergroundobject import SamGroundObject
class GenericSamGroupGenerator(GroupGenerator, ABC):

View File

@@ -1,7 +1,7 @@
from __future__ import annotations
import math
import random
from typing import TYPE_CHECKING, Optional
from typing import TYPE_CHECKING
from dcs import unitgroup
from dcs.point import PointAction
@@ -9,7 +9,7 @@ from dcs.unit import Vehicle, Ship
from dcs.unittype import VehicleType
from game.factions.faction import Faction
from theater.theatergroundobject import TheaterGroundObject
from game.theater.theatergroundobject import TheaterGroundObject
if TYPE_CHECKING:
from game.game import Game

View File

@@ -1,18 +1,21 @@
import random
from typing import List, Optional, Type
from dcs.vehicles import AirDefence
from dcs.unitgroup import VehicleGroup
from dcs.vehicles import AirDefence
from game import Game, db
from game.theater import TheaterGroundObject
from game.theater.theatergroundobject import SamGroundObject
from gen.sam.aaa_bofors import BoforsGenerator
from gen.sam.aaa_flak import FlakGenerator
from gen.sam.aaa_flak18 import Flak18Generator
from gen.sam.aaa_ww2_ally_flak import AllyWW2FlakGenerator
from gen.sam.aaa_zu23_insurgent import ZU23InsurgentGenerator
from gen.sam.cold_war_flak import EarlyColdWarFlakGenerator, ColdWarFlakGenerator
from gen.sam.cold_war_flak import (
ColdWarFlakGenerator,
EarlyColdWarFlakGenerator,
)
from gen.sam.ewrs import (
BigBirdGenerator,
BoxSpringGenerator,
@@ -25,6 +28,7 @@ from gen.sam.ewrs import (
StraightFlushGenerator,
TallRackGenerator,
)
from gen.sam.freya_ewr import FreyaGenerator
from gen.sam.group_generator import GroupGenerator
from gen.sam.sam_avenger import AvengerGenerator
from gen.sam.sam_chaparral import ChaparralGenerator
@@ -50,9 +54,6 @@ from gen.sam.sam_zsu23 import ZSU23Generator
from gen.sam.sam_zu23 import ZU23Generator
from gen.sam.sam_zu23_ural import ZU23UralGenerator
from gen.sam.sam_zu23_ural_insurgent import ZU23UralInsurgentGenerator
from gen.sam.freya_ewr import FreyaGenerator
from theater import TheaterGroundObject
from theater.theatergroundobject import SamGroundObject
SAM_MAP = {
"HawkGenerator": HawkGenerator,