mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix mypy issues in all modules except qt_ui.
This commit is contained in:
@@ -1,4 +1,22 @@
|
||||
from dcs.planes import *
|
||||
from dcs.planes import (
|
||||
Bf_109K_4,
|
||||
C_101CC,
|
||||
FW_190A8,
|
||||
FW_190D9,
|
||||
F_5E_3,
|
||||
F_86F_Sabre,
|
||||
I_16,
|
||||
L_39ZA,
|
||||
MiG_15bis,
|
||||
MiG_19P,
|
||||
MiG_21Bis,
|
||||
P_47D_30,
|
||||
P_51D,
|
||||
P_51D_30_NA,
|
||||
SpitfireLFMkIX,
|
||||
SpitfireLFMkIXCW,
|
||||
)
|
||||
|
||||
from pydcs_extensions.a4ec.a4ec import A_4E_C
|
||||
|
||||
"""
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
from dcs.ships import (
|
||||
CGN_1144_2_Pyotr_Velikiy,
|
||||
CG_1164_Moskva,
|
||||
CVN_70_Carl_Vinson,
|
||||
CVN_71_Theodore_Roosevelt,
|
||||
CVN_72_Abraham_Lincoln,
|
||||
CVN_73_George_Washington,
|
||||
CVN_74_John_C__Stennis,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
CV_1143_5_Admiral_Kuznetsov_2017,
|
||||
FFG_11540_Neustrashimy,
|
||||
FFL_1124_4_Grisha,
|
||||
FF_1135M_Rezky,
|
||||
FSG_1241_1MP_Molniya,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
Type_052B_Destroyer,
|
||||
Type_052C_Destroyer,
|
||||
Type_054A_Frigate,
|
||||
USS_Arleigh_Burke_IIa,
|
||||
)
|
||||
from dcs.vehicles import AirDefence
|
||||
from dcs.ships import *
|
||||
|
||||
UNITS_WITH_RADAR = [
|
||||
|
||||
|
||||
234
game/db.py
234
game/db.py
@@ -1,34 +1,176 @@
|
||||
import typing
|
||||
import enum
|
||||
from datetime import datetime
|
||||
from enum import Enum
|
||||
from typing import Any, Dict, List, Optional, Tuple, Type, Union
|
||||
|
||||
from dcs.countries import get_by_id, country_dict
|
||||
from dcs.vehicles import *
|
||||
from dcs.ships import *
|
||||
from dcs.planes import *
|
||||
from dcs.helicopters import *
|
||||
|
||||
from dcs.task import *
|
||||
from dcs.unit import *
|
||||
from dcs.unittype import *
|
||||
from dcs.unitgroup import *
|
||||
from dcs.countries import country_dict
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
AH_64A,
|
||||
AH_64D,
|
||||
HelicopterType,
|
||||
Ka_50,
|
||||
Mi_24V,
|
||||
Mi_28N,
|
||||
Mi_8MT,
|
||||
OH_58D,
|
||||
SA342L,
|
||||
SA342M,
|
||||
SA342Minigun,
|
||||
SA342Mistral,
|
||||
UH_1H,
|
||||
UH_60A,
|
||||
helicopter_map,
|
||||
)
|
||||
from dcs.mapping import Point
|
||||
# mypy can't resolve these if they're wildcard imports for some reason.
|
||||
from dcs.planes import (
|
||||
AJS37,
|
||||
AV8BNA,
|
||||
A_10A,
|
||||
A_10C,
|
||||
A_10C_2,
|
||||
A_20G,
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
B_17G,
|
||||
B_1B,
|
||||
B_52H,
|
||||
Bf_109K_4,
|
||||
C_101CC,
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
FW_190A8,
|
||||
FW_190D9,
|
||||
F_14B,
|
||||
F_15C,
|
||||
F_15E,
|
||||
F_16A,
|
||||
F_16C_50,
|
||||
F_4E,
|
||||
F_5E_3,
|
||||
F_86F_Sabre,
|
||||
F_A_18C,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
JF_17,
|
||||
J_11A,
|
||||
Ju_88A4,
|
||||
KC130,
|
||||
KC_135,
|
||||
KJ_2000,
|
||||
L_39C,
|
||||
L_39ZA,
|
||||
MQ_9_Reaper,
|
||||
M_2000C,
|
||||
MiG_15bis,
|
||||
MiG_19P,
|
||||
MiG_21Bis,
|
||||
MiG_23MLD,
|
||||
MiG_25PD,
|
||||
MiG_27K,
|
||||
MiG_29A,
|
||||
MiG_29G,
|
||||
MiG_29S,
|
||||
MiG_31,
|
||||
Mirage_2000_5,
|
||||
P_47D_30,
|
||||
P_47D_30bl1,
|
||||
P_47D_40,
|
||||
P_51D,
|
||||
P_51D_30_NA,
|
||||
PlaneType,
|
||||
RQ_1A_Predator,
|
||||
S_3B_Tanker,
|
||||
SpitfireLFMkIX,
|
||||
SpitfireLFMkIXCW,
|
||||
Su_17M4,
|
||||
Su_24M,
|
||||
Su_24MR,
|
||||
Su_25,
|
||||
Su_25T,
|
||||
Su_25TM,
|
||||
Su_27,
|
||||
Su_30,
|
||||
Su_33,
|
||||
Su_34,
|
||||
Tornado_GR4,
|
||||
Tornado_IDS,
|
||||
WingLoong_I,
|
||||
Yak_40,
|
||||
plane_map,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CVN_71_Theodore_Roosevelt,
|
||||
CVN_72_Abraham_Lincoln,
|
||||
CVN_73_George_Washington,
|
||||
CVN_74_John_C__Stennis,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
CV_1143_5_Admiral_Kuznetsov_2017,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
LHA_1_Tarawa,
|
||||
Tanker_Elnya_160,
|
||||
ship_map,
|
||||
)
|
||||
from dcs.task import (
|
||||
AWACS,
|
||||
AntishipStrike,
|
||||
CAP,
|
||||
CAS,
|
||||
CargoTransportation,
|
||||
Embarking,
|
||||
GroundAttack,
|
||||
Intercept,
|
||||
MainTask,
|
||||
Nothing,
|
||||
PinpointStrike,
|
||||
Reconnaissance,
|
||||
Refueling,
|
||||
SEAD,
|
||||
Task,
|
||||
Transport,
|
||||
)
|
||||
from dcs.terrain.terrain import Airport
|
||||
from dcs.unit import Ship, Unit, Vehicle
|
||||
from dcs.unitgroup import ShipGroup, StaticGroup
|
||||
from dcs.unittype import FlyingType, ShipType, UnitType, VehicleType
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Carriage,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
vehicle_map,
|
||||
)
|
||||
|
||||
import pydcs_extensions.frenchpack.frenchpack as frenchpack
|
||||
from game.factions.australia_2005 import Australia_2005
|
||||
from game.factions.bluefor_coldwar import BLUEFOR_COLDWAR
|
||||
from game.factions.bluefor_coldwar_a4 import BLUEFOR_COLDWAR_A4
|
||||
from game.factions.bluefor_coldwar_mods import BLUEFOR_COLDWAR_MODS
|
||||
from game.factions.bluefor_modern import BLUEFOR_MODERN
|
||||
from game.factions.canada_2005 import Canada_2005
|
||||
from game.factions.china_2010 import China_2010
|
||||
from game.factions.france_1995 import France_1995
|
||||
from game.factions.france_2005 import France_2005
|
||||
from game.factions.france_modded import France_2005_Modded
|
||||
from game.factions.germany_1944 import Germany_1944
|
||||
from game.factions.germany_1944_easy import Germany_1944_Easy
|
||||
from game.factions.germany_1990 import Germany_1990
|
||||
from game.factions.india_2010 import India_2010
|
||||
from game.factions.insurgent import Insurgent
|
||||
from game.factions.insurgent_modded import Insurgent_modded
|
||||
from game.factions.iran_2015 import Iran_2015
|
||||
from game.factions.israel_1948 import Israel_1948
|
||||
from game.factions.israel_1973 import Israel_1973, Israel_1973_NO_WW2_UNITS, Israel_1982
|
||||
from game.factions.israel_1973 import (
|
||||
Israel_1973,
|
||||
Israel_1973_NO_WW2_UNITS,
|
||||
Israel_1982,
|
||||
)
|
||||
from game.factions.israel_2000 import Israel_2000
|
||||
from game.factions.italy_1990 import Italy_1990
|
||||
from game.factions.italy_1990_mb339 import Italy_1990_MB339
|
||||
@@ -37,35 +179,41 @@ from game.factions.libya_2011 import Libya_2011
|
||||
from game.factions.netherlands_1990 import Netherlands_1990
|
||||
from game.factions.north_korea_2000 import NorthKorea_2000
|
||||
from game.factions.pakistan_2015 import Pakistan_2015
|
||||
from game.factions.private_miltary_companies import PMC_WESTERN_B, PMC_RUSSIAN, PMC_WESTERN_A
|
||||
from game.factions.russia_1975 import Russia_1975
|
||||
from game.factions.germany_1944 import Germany_1944
|
||||
from game.factions.india_2010 import India_2010
|
||||
from game.factions.private_miltary_companies import (
|
||||
PMC_RUSSIAN,
|
||||
PMC_WESTERN_A,
|
||||
PMC_WESTERN_B,
|
||||
)
|
||||
from game.factions.russia_1955 import Russia_1955
|
||||
from game.factions.russia_1965 import Russia_1965
|
||||
from game.factions.russia_1975 import Russia_1975
|
||||
from game.factions.russia_1990 import Russia_1990
|
||||
from game.factions.russia_2010 import Russia_2010
|
||||
from game.factions.spain_1990 import Spain_1990
|
||||
from game.factions.sweden_1990 import Sweden_1990
|
||||
from game.factions.syria import Syria_2011, Syria_1967, Syria_1967_WW2_Weapons, Syria_1973, Arab_Armies_1948, Syria_1982
|
||||
from game.factions.syria import (
|
||||
Arab_Armies_1948,
|
||||
Syria_1967,
|
||||
Syria_1967_WW2_Weapons,
|
||||
Syria_1973,
|
||||
Syria_1982,
|
||||
Syria_2011,
|
||||
)
|
||||
from game.factions.turkey_2005 import Turkey_2005
|
||||
from game.factions.uae_2005 import UAE_2005
|
||||
from game.factions.uk_1944 import UK_1944
|
||||
from game.factions.uk_1990 import UnitedKingdom_1990
|
||||
from game.factions.ukraine_2010 import Ukraine_2010
|
||||
from game.factions.us_aggressors import US_Aggressors
|
||||
from game.factions.usa_1944 import USA_1944, ALLIES_1944
|
||||
from game.factions.usa_1944 import ALLIES_1944, USA_1944
|
||||
from game.factions.usa_1955 import USA_1955
|
||||
from game.factions.usa_1960 import USA_1960
|
||||
from game.factions.usa_1965 import USA_1965
|
||||
from game.factions.usa_1990 import USA_1990
|
||||
from game.factions.usa_2005 import USA_2005
|
||||
from game.factions.bluefor_modern import BLUEFOR_MODERN
|
||||
|
||||
# PATCH pydcs data with MODS
|
||||
from pydcs_extensions.a4ec.a4ec import A_4E_C
|
||||
from pydcs_extensions.mb339.mb339 import MB_339PAN
|
||||
import pydcs_extensions.frenchpack.frenchpack as frenchpack
|
||||
from pydcs_extensions.rafale.rafale import Rafale_A_S, Rafale_M
|
||||
|
||||
plane_map["A-4E-C"] = A_4E_C
|
||||
@@ -793,13 +941,13 @@ SAM_CONVERT = {
|
||||
"""
|
||||
Units that will always be spawned in the air
|
||||
"""
|
||||
TAKEOFF_BAN = [
|
||||
TAKEOFF_BAN: List[Type[FlyingType]] = [
|
||||
]
|
||||
|
||||
"""
|
||||
Units that will be always spawned in the air if launched from the carrier
|
||||
"""
|
||||
CARRIER_TAKEOFF_BAN = [
|
||||
CARRIER_TAKEOFF_BAN: List[Type[FlyingType]] = [
|
||||
Su_33, # Kuznecow is bugged in a way that only 2 aircraft could be spawned
|
||||
]
|
||||
|
||||
@@ -807,7 +955,7 @@ CARRIER_TAKEOFF_BAN = [
|
||||
Units separated by country.
|
||||
country : DCS Country name
|
||||
"""
|
||||
FACTIONS: typing.Dict[str, typing.Dict[str, typing.Any]] = {
|
||||
FACTIONS: Dict[str, Dict[str, Any]] = {
|
||||
|
||||
"Bluefor Modern": BLUEFOR_MODERN,
|
||||
"Bluefor Cold War 1970s": BLUEFOR_COLDWAR,
|
||||
@@ -937,7 +1085,7 @@ COMMON_OVERRIDE = {
|
||||
GroundAttack: "STRIKE"
|
||||
}
|
||||
|
||||
PLANE_PAYLOAD_OVERRIDES = {
|
||||
PLANE_PAYLOAD_OVERRIDES: Dict[Type[PlaneType], Dict[Type[Task], str]] = {
|
||||
|
||||
FA_18C_hornet: {
|
||||
CAP: "CAP HEAVY",
|
||||
@@ -1134,17 +1282,17 @@ LHA_CAPABLE = [
|
||||
---------- END OF CONFIGURATION SECTION
|
||||
"""
|
||||
|
||||
UnitsDict = typing.Dict[UnitType, int]
|
||||
PlaneDict = typing.Dict[FlyingType, int]
|
||||
HeliDict = typing.Dict[HelicopterType, int]
|
||||
ArmorDict = typing.Dict[VehicleType, int]
|
||||
ShipDict = typing.Dict[ShipType, int]
|
||||
AirDefenseDict = typing.Dict[AirDefence, int]
|
||||
UnitsDict = Dict[UnitType, int]
|
||||
PlaneDict = Dict[FlyingType, int]
|
||||
HeliDict = Dict[HelicopterType, int]
|
||||
ArmorDict = Dict[VehicleType, int]
|
||||
ShipDict = Dict[ShipType, int]
|
||||
AirDefenseDict = Dict[AirDefence, int]
|
||||
|
||||
AssignedUnitsDict = typing.Dict[typing.Type[UnitType], typing.Tuple[int, int]]
|
||||
TaskForceDict = typing.Dict[typing.Type[MainTask], AssignedUnitsDict]
|
||||
AssignedUnitsDict = Dict[Type[UnitType], Tuple[int, int]]
|
||||
TaskForceDict = Dict[Type[MainTask], AssignedUnitsDict]
|
||||
|
||||
StartingPosition = typing.Optional[typing.Union[ShipGroup, StaticGroup, Airport, Point]]
|
||||
StartingPosition = Union[ShipGroup, StaticGroup, Airport, Point]
|
||||
|
||||
|
||||
def upgrade_to_supercarrier(unit, name: str):
|
||||
@@ -1162,7 +1310,7 @@ def upgrade_to_supercarrier(unit, name: str):
|
||||
else:
|
||||
return unit
|
||||
|
||||
def unit_task(unit: UnitType) -> Task:
|
||||
def unit_task(unit: UnitType) -> Optional[Task]:
|
||||
for task, units in UNIT_BY_TASK.items():
|
||||
if unit in units:
|
||||
return task
|
||||
@@ -1173,10 +1321,10 @@ def unit_task(unit: UnitType) -> Task:
|
||||
print(unit.name + " cause issue")
|
||||
return None
|
||||
|
||||
def find_unittype(for_task: Task, country_name: str) -> typing.List[UnitType]:
|
||||
def find_unittype(for_task: Task, country_name: str) -> List[UnitType]:
|
||||
return [x for x in UNIT_BY_TASK[for_task] if x in FACTIONS[country_name]["units"]]
|
||||
|
||||
def find_infantry(country_name: str) -> typing.List[UnitType]:
|
||||
def find_infantry(country_name: str) -> List[UnitType]:
|
||||
inf = [
|
||||
Infantry.Paratrooper_AKS, Infantry.Paratrooper_AKS, Infantry.Paratrooper_AKS, Infantry.Paratrooper_AKS, Infantry.Paratrooper_AKS,
|
||||
Infantry.Soldier_RPG,
|
||||
@@ -1199,7 +1347,7 @@ def unit_type_name(unit_type) -> str:
|
||||
def unit_type_name_2(unit_type) -> str:
|
||||
return unit_type.name and unit_type.name or unit_type.id
|
||||
|
||||
def unit_type_from_name(name: str) -> UnitType:
|
||||
def unit_type_from_name(name: str) -> Optional[UnitType]:
|
||||
if name in vehicle_map:
|
||||
return vehicle_map[name]
|
||||
elif name in plane_map:
|
||||
@@ -1232,7 +1380,7 @@ def task_name(task) -> str:
|
||||
return task.name
|
||||
|
||||
|
||||
def choose_units(for_task: Task, factor: float, count: int, country: str) -> typing.Collection[UnitType]:
|
||||
def choose_units(for_task: Task, factor: float, count: int, country: str) -> List[UnitType]:
|
||||
suitable_unittypes = find_unittype(for_task, country)
|
||||
suitable_unittypes = [x for x in suitable_unittypes if x not in helicopter_map.values()]
|
||||
suitable_unittypes.sort(key=lambda x: PRICES[x])
|
||||
@@ -1258,7 +1406,7 @@ def unitdict_merge(a: UnitsDict, b: UnitsDict) -> UnitsDict:
|
||||
|
||||
|
||||
def unitdict_split(unit_dict: UnitsDict, count: int):
|
||||
buffer_dict = {}
|
||||
buffer_dict: Dict[UnitType, int] = {}
|
||||
for unit_type, unit_count in unit_dict.items():
|
||||
for _ in range(unit_count):
|
||||
unitdict_append(buffer_dict, unit_type, 1)
|
||||
@@ -1281,7 +1429,7 @@ def unitdict_restrict_count(unit_dict: UnitsDict, total_count: int) -> UnitsDict
|
||||
return {}
|
||||
|
||||
|
||||
def assigned_units_split(fd: AssignedUnitsDict) -> typing.Tuple[PlaneDict, PlaneDict]:
|
||||
def assigned_units_split(fd: AssignedUnitsDict) -> Tuple[PlaneDict, PlaneDict]:
|
||||
return {k: v1 for k, (v1, v2) in fd.items()}, {k: v2 for k, (v1, v2) in fd.items()},
|
||||
|
||||
|
||||
@@ -1290,7 +1438,7 @@ def assigned_units_from(d: PlaneDict) -> AssignedUnitsDict:
|
||||
|
||||
|
||||
def assignedunits_split_to_count(dict: AssignedUnitsDict, count: int):
|
||||
buffer_dict = {}
|
||||
buffer_dict: Dict[Type[UnitType], Tuple[int, int]] = {}
|
||||
for unit_type, (unit_count, client_count) in dict.items():
|
||||
for _ in range(unit_count):
|
||||
new_count, new_client_count = buffer_dict.get(unit_type, (0, 0))
|
||||
|
||||
@@ -1,13 +1,25 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import math
|
||||
from typing import Dict, List, Optional, Type, TYPE_CHECKING
|
||||
|
||||
from dcs.mapping import Point
|
||||
from dcs.task import Task
|
||||
from dcs.unittype import UnitType
|
||||
|
||||
from game import *
|
||||
from game import persistency
|
||||
from game import db, persistency
|
||||
from game.debriefing import Debriefing
|
||||
from game.infos.information import Information
|
||||
from game.operation.operation import Operation
|
||||
from gen.environmentgen import EnvironmentSettings
|
||||
from theater import *
|
||||
from gen.ground_forces.combat_stance import CombatStance
|
||||
from theater import ControlPoint
|
||||
from theater.start_generator import generate_airbase_defense_group
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..game import Game
|
||||
|
||||
DIFFICULTY_LOG_BASE = 1.1
|
||||
EVENT_DEPARTURE_MAX_DISTANCE = 340000
|
||||
|
||||
@@ -26,7 +38,6 @@ class Event:
|
||||
game = None # type: Game
|
||||
location = None # type: Point
|
||||
from_cp = None # type: ControlPoint
|
||||
departure_cp = None # type: ControlPoint
|
||||
to_cp = None # type: ControlPoint
|
||||
|
||||
operation = None # type: Operation
|
||||
@@ -36,7 +47,7 @@ class Event:
|
||||
|
||||
def __init__(self, game, from_cp: ControlPoint, target_cp: ControlPoint, location: Point, attacker_name: str, defender_name: str):
|
||||
self.game = game
|
||||
self.departure_cp = None
|
||||
self.departure_cp: Optional[ControlPoint] = None
|
||||
self.from_cp = from_cp
|
||||
self.to_cp = target_cp
|
||||
self.location = location
|
||||
@@ -48,14 +59,14 @@ class Event:
|
||||
return self.attacker_name == self.game.player_name
|
||||
|
||||
@property
|
||||
def enemy_cp(self) -> ControlPoint:
|
||||
def enemy_cp(self) -> Optional[ControlPoint]:
|
||||
if self.attacker_name == self.game.player_name:
|
||||
return self.to_cp
|
||||
else:
|
||||
return self.departure_cp
|
||||
|
||||
@property
|
||||
def tasks(self) -> typing.Collection[typing.Type[Task]]:
|
||||
def tasks(self) -> List[Type[Task]]:
|
||||
return []
|
||||
|
||||
@property
|
||||
@@ -80,18 +91,6 @@ class Event:
|
||||
def is_successfull(self, debriefing: Debriefing) -> bool:
|
||||
return self.operation.is_successfull(debriefing)
|
||||
|
||||
def player_attacking(self, cp: ControlPoint, flights: db.TaskForceDict):
|
||||
if self.is_player_attacking:
|
||||
self.departure_cp = cp
|
||||
else:
|
||||
self.to_cp = cp
|
||||
|
||||
def player_defending(self, cp: ControlPoint, flights: db.TaskForceDict):
|
||||
if self.is_player_attacking:
|
||||
self.departure_cp = cp
|
||||
else:
|
||||
self.to_cp = cp
|
||||
|
||||
def generate(self):
|
||||
self.operation.is_awacs_enabled = self.is_awacs_enabled
|
||||
self.operation.ca_slots = self.ca_slots
|
||||
@@ -242,7 +241,7 @@ class Event:
|
||||
for enemy_cp in enemy_cps:
|
||||
print("Compute frontline progression for : " + cp.name + " to " + enemy_cp.name)
|
||||
|
||||
delta = 0
|
||||
delta = 0.0
|
||||
player_won = True
|
||||
ally_casualties = killed_unit_count_by_cp[cp.id]
|
||||
enemy_casualties = killed_unit_count_by_cp[enemy_cp.id]
|
||||
@@ -365,7 +364,6 @@ class Event:
|
||||
|
||||
class UnitsDeliveryEvent(Event):
|
||||
informational = True
|
||||
units = None # type: typing.Dict[UnitType, int]
|
||||
|
||||
def __init__(self, attacker_name: str, defender_name: str, from_cp: ControlPoint, to_cp: ControlPoint, game):
|
||||
super(UnitsDeliveryEvent, self).__init__(game=game,
|
||||
@@ -375,12 +373,12 @@ class UnitsDeliveryEvent(Event):
|
||||
attacker_name=attacker_name,
|
||||
defender_name=defender_name)
|
||||
|
||||
self.units = {}
|
||||
self.units: Dict[UnitType, int] = {}
|
||||
|
||||
def __str__(self):
|
||||
return "Pending delivery to {}".format(self.to_cp)
|
||||
|
||||
def deliver(self, units: typing.Dict[UnitType, int]):
|
||||
def deliver(self, units: Dict[UnitType, int]):
|
||||
for k, v in units.items():
|
||||
self.units[k] = self.units.get(k, 0) + v
|
||||
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
from game.event import *
|
||||
from typing import List, Type
|
||||
|
||||
from dcs.task import CAP, CAS, Task
|
||||
|
||||
from game import db
|
||||
from game.operation.frontlineattack import FrontlineAttackOperation
|
||||
from .event import Event
|
||||
from ..debriefing import Debriefing
|
||||
|
||||
|
||||
class FrontlineAttackEvent(Event):
|
||||
|
||||
@property
|
||||
def tasks(self) -> typing.Collection[typing.Type[Task]]:
|
||||
def tasks(self) -> List[Type[Task]]:
|
||||
if self.is_player_attacking:
|
||||
return [CAS, CAP]
|
||||
else:
|
||||
@@ -34,6 +39,7 @@ class FrontlineAttackEvent(Event):
|
||||
self.to_cp.base.affect_strength(-0.1)
|
||||
|
||||
def player_attacking(self, flights: db.TaskForceDict):
|
||||
assert self.departure_cp is not None
|
||||
op = FrontlineAttackOperation(game=self.game,
|
||||
attacker_name=self.attacker_name,
|
||||
defender_name=self.defender_name,
|
||||
@@ -41,13 +47,3 @@ class FrontlineAttackEvent(Event):
|
||||
departure_cp=self.departure_cp,
|
||||
to_cp=self.to_cp)
|
||||
self.operation = op
|
||||
|
||||
def player_defending(self, flights: db.TaskForceDict):
|
||||
op = FrontlineAttackOperation(game=self.game,
|
||||
attacker_name=self.attacker_name,
|
||||
defender_name=self.defender_name,
|
||||
from_cp=self.from_cp,
|
||||
departure_cp=self.departure_cp,
|
||||
to_cp=self.to_cp)
|
||||
self.operation = op
|
||||
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Ticonderoga_class,
|
||||
USS_Arleigh_Burke_IIa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Australia_2005 = {
|
||||
"country": "Australia",
|
||||
|
||||
@@ -1,7 +1,30 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
SA342L,
|
||||
SA342M,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AJS37,
|
||||
A_10A,
|
||||
C_130,
|
||||
E_3A,
|
||||
F_14B,
|
||||
F_4E,
|
||||
F_5E_3,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
BLUEFOR_COLDWAR = {
|
||||
"country": "Combined Joint Task Forces Blue",
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
SA342L,
|
||||
SA342M,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AJS37,
|
||||
A_10A,
|
||||
C_130,
|
||||
E_3A,
|
||||
F_14B,
|
||||
F_4E,
|
||||
F_5E_3,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Ticonderoga_class,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from pydcs_extensions.a4ec.a4ec import A_4E_C
|
||||
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
SA342L,
|
||||
SA342M,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AJS37,
|
||||
A_10A,
|
||||
C_130,
|
||||
E_3A,
|
||||
F_14B,
|
||||
F_4E,
|
||||
F_5E_3,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Ticonderoga_class,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from pydcs_extensions.a4ec.a4ec import A_4E_C
|
||||
from pydcs_extensions.mb339.mb339 import MB_339PAN
|
||||
|
||||
@@ -1,7 +1,45 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_64D,
|
||||
Ka_50,
|
||||
SA342L,
|
||||
SA342M,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AJS37,
|
||||
AV8BNA,
|
||||
A_10A,
|
||||
A_10C,
|
||||
A_10C_2,
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
F_14B,
|
||||
F_15C,
|
||||
F_16C_50,
|
||||
F_5E_3,
|
||||
JF_17,
|
||||
KC130,
|
||||
KC_135,
|
||||
M_2000C,
|
||||
Su_25T,
|
||||
Su_27,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
USS_Arleigh_Burke_IIa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
BLUEFOR_MODERN = {
|
||||
"country": "Combined Joint Task Forces Blue",
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Ticonderoga_class,
|
||||
USS_Arleigh_Burke_IIa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Canada_2005 = {
|
||||
"country": "Canada",
|
||||
|
||||
@@ -1,7 +1,38 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Mi_28N,
|
||||
Mi_8MT,
|
||||
)
|
||||
from dcs.planes import (
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
JF_17,
|
||||
J_11A,
|
||||
KJ_2000,
|
||||
MiG_21Bis,
|
||||
Su_30,
|
||||
Su_33,
|
||||
WingLoong_I,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
Type_052B_Destroyer,
|
||||
Type_052C_Destroyer,
|
||||
Type_054A_Frigate,
|
||||
Type_071_Amphibious_Transport_Dock,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
China_2010 = {
|
||||
"country": "China",
|
||||
|
||||
@@ -1,7 +1,28 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
SA342L,
|
||||
SA342M,
|
||||
SA342Mistral,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
KC130,
|
||||
KC_135,
|
||||
M_2000C,
|
||||
Mirage_2000_5,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
France_1995 = {
|
||||
"country": "France",
|
||||
|
||||
@@ -1,7 +1,31 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
SA342L,
|
||||
SA342M,
|
||||
SA342Mistral,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
KC130,
|
||||
KC_135,
|
||||
M_2000C,
|
||||
Mirage_2000_5,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
France_2005 = {
|
||||
"country": "France",
|
||||
|
||||
@@ -1,10 +1,33 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
SA342L,
|
||||
SA342M,
|
||||
SA342Mistral,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
KC130,
|
||||
KC_135,
|
||||
M_2000C,
|
||||
Mirage_2000_5,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
import pydcs_extensions.frenchpack.frenchpack as frenchpack
|
||||
from pydcs_extensions.rafale.rafale import Rafale_M, Rafale_A_S
|
||||
from pydcs_extensions.rafale.rafale import Rafale_A_S, Rafale_M
|
||||
|
||||
France_2005_Modded = {
|
||||
"country": "France",
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
from dcs.planes import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.planes import (
|
||||
Bf_109K_4,
|
||||
FW_190A8,
|
||||
FW_190D9,
|
||||
Ju_88A4,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from game.data.building_data import WW2_GERMANY_BUILDINGS
|
||||
from game.data.doctrine import WWII_DOCTRINE
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
from dcs.planes import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.planes import (
|
||||
Bf_109K_4,
|
||||
FW_190A8,
|
||||
FW_190D9,
|
||||
Ju_88A4,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from game.data.building_data import WW2_GERMANY_BUILDINGS
|
||||
from game.data.doctrine import WWII_DOCTRINE
|
||||
|
||||
@@ -1,7 +1,28 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
SA342L,
|
||||
SA342M,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_4E,
|
||||
KC130,
|
||||
KC_135,
|
||||
MiG_29G,
|
||||
Tornado_IDS,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Germany_1990 = {
|
||||
"country": "Germany",
|
||||
|
||||
@@ -1,7 +1,32 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_64A,
|
||||
Mi_8MT,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
KC130,
|
||||
KC_135,
|
||||
M_2000C,
|
||||
MiG_21Bis,
|
||||
MiG_27K,
|
||||
MiG_29S,
|
||||
Mirage_2000_5,
|
||||
Su_30,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
FSG_1241_1MP_Molniya,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
India_2010 = {
|
||||
"country": "India",
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
from dcs.vehicles import *
|
||||
from dcs.ships import *
|
||||
from dcs.planes import *
|
||||
from dcs.helicopters import *
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Insurgent = {
|
||||
"country": "Insurgents",
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from pydcs_extensions.frenchpack.frenchpack import DIM__TOYOTA_BLUE, DIM__TOYOTA_DESERT, DIM__TOYOTA_GREEN, \
|
||||
DIM__KAMIKAZE
|
||||
from pydcs_extensions.frenchpack.frenchpack import (
|
||||
DIM__KAMIKAZE,
|
||||
DIM__TOYOTA_BLUE,
|
||||
DIM__TOYOTA_DESERT,
|
||||
DIM__TOYOTA_GREEN,
|
||||
)
|
||||
|
||||
Insurgent_modded = {
|
||||
"country": "Insurgents",
|
||||
|
||||
@@ -1,7 +1,35 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Mi_24V,
|
||||
Mi_28N,
|
||||
)
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
F_14B,
|
||||
F_4E,
|
||||
F_5E_3,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
MiG_21Bis,
|
||||
MiG_29A,
|
||||
Su_17M4,
|
||||
Su_24M,
|
||||
Su_25,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Iran_2015 = {
|
||||
"country": "Iran",
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.planes import (
|
||||
B_17G,
|
||||
Bf_109K_4,
|
||||
P_51D,
|
||||
P_51D_30_NA,
|
||||
SpitfireLFMkIX,
|
||||
SpitfireLFMkIXCW,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Israel_1948 = {
|
||||
"country": "Israel",
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_15C,
|
||||
F_16A,
|
||||
F_16C_50,
|
||||
F_4E,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from pydcs_extensions.a4ec.a4ec import A_4E_C
|
||||
|
||||
|
||||
@@ -1,7 +1,29 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
AH_64D,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_15C,
|
||||
F_15E,
|
||||
F_16C_50,
|
||||
F_4E,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Israel_2000 = {
|
||||
"country": "Israel",
|
||||
|
||||
@@ -1,7 +1,28 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AV8BNA,
|
||||
C_130,
|
||||
E_3A,
|
||||
KC_135,
|
||||
S_3B_Tanker,
|
||||
Tornado_IDS,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Italy_1990 = {
|
||||
"country": "Italy",
|
||||
|
||||
@@ -1,7 +1,28 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AV8BNA,
|
||||
C_130,
|
||||
E_3A,
|
||||
KC_135,
|
||||
S_3B_Tanker,
|
||||
Tornado_IDS,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from pydcs_extensions.mb339.mb339 import MB_339PAN
|
||||
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
AH_64D,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_15C,
|
||||
F_16C_50,
|
||||
F_4E,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import LHA_1_Tarawa, Ticonderoga_class, USS_Arleigh_Burke_IIa
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Japan_2005 = {
|
||||
"country": "Japan",
|
||||
|
||||
@@ -1,6 +1,25 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Mi_24V,
|
||||
)
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
MiG_21Bis,
|
||||
MiG_23MLD,
|
||||
Su_17M4,
|
||||
Su_24M,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Libya_2011 = {
|
||||
"country": "Libya",
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_64A,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_16C_50,
|
||||
F_5E_3,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Netherlands_1990 = {
|
||||
"country": "The Netherlands",
|
||||
|
||||
@@ -1,7 +1,33 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Mi_24V,
|
||||
Mi_8MT,
|
||||
)
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
MiG_15bis,
|
||||
MiG_19P,
|
||||
MiG_21Bis,
|
||||
MiG_23MLD,
|
||||
MiG_29A,
|
||||
Su_25,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
NorthKorea_2000 = {
|
||||
"country": "North Korea",
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
E_3A,
|
||||
F_16C_50,
|
||||
IL_78M,
|
||||
JF_17,
|
||||
MiG_19P,
|
||||
MiG_21Bis,
|
||||
WingLoong_I,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Pakistan_2015 = {
|
||||
"country": "Pakistan",
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Ka_50,
|
||||
Mi_24V,
|
||||
Mi_8MT,
|
||||
OH_58D,
|
||||
SA342M,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_101CC,
|
||||
L_39C,
|
||||
L_39ZA,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from pydcs_extensions.mb339.mb339 import MB_339PAN
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
from dcs.planes import MiG_15bis, IL_76MD, IL_78M, An_26B, An_30M, Yak_40
|
||||
from dcs.ships import CV_1143_5_Admiral_Kuznetsov, Bulk_cargo_ship_Yakushev, Dry_cargo_ship_Ivanov, Tanker_Elnya_160
|
||||
from dcs.vehicles import AirDefence, Armor, Unarmed, Infantry, Artillery
|
||||
from dcs.planes import An_26B, An_30M, IL_76MD, IL_78M, MiG_15bis, Yak_40
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import AirDefence, Armor, Artillery, Infantry, Unarmed
|
||||
|
||||
Russia_1955 = {
|
||||
"country": "Russia",
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
from dcs.helicopters import Mi_8MT
|
||||
from dcs.planes import MiG_15bis, MiG_19P, MiG_21Bis, IL_76MD, IL_78M, An_26B, An_30M, Yak_40, A_50
|
||||
from dcs.ships import CV_1143_5_Admiral_Kuznetsov, Bulk_cargo_ship_Yakushev, Dry_cargo_ship_Ivanov, Tanker_Elnya_160
|
||||
from dcs.vehicles import AirDefence, Armor, Unarmed, Infantry, Artillery
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
MiG_15bis,
|
||||
MiG_19P,
|
||||
MiG_21Bis,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import AirDefence, Armor, Artillery, Infantry, Unarmed
|
||||
|
||||
Russia_1965 = {
|
||||
"country": "Russia",
|
||||
|
||||
@@ -1,8 +1,31 @@
|
||||
from dcs.helicopters import Mi_8MT, Mi_24V
|
||||
from dcs.planes import MiG_21Bis, MiG_23MLD, MiG_25PD, MiG_29A, Su_17M4, Su_24M, Su_25, IL_76MD, IL_78M, An_26B, An_30M, \
|
||||
Yak_40, A_50
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import AirDefence, Armor, Unarmed, Infantry, Artillery
|
||||
from dcs.helicopters import (
|
||||
Mi_24V,
|
||||
Mi_8MT,
|
||||
)
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
MiG_21Bis,
|
||||
MiG_23MLD,
|
||||
MiG_25PD,
|
||||
MiG_29A,
|
||||
Su_17M4,
|
||||
Su_24M,
|
||||
Su_25,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CGN_1144_2_Pyotr_Velikiy,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
FF_1135M_Rezky,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import AirDefence, Armor, Artillery, Infantry, Unarmed
|
||||
|
||||
Russia_1975 = {
|
||||
"country": "Russia",
|
||||
|
||||
@@ -1,7 +1,39 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Ka_50,
|
||||
Mi_24V,
|
||||
Mi_8MT,
|
||||
)
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
MiG_23MLD,
|
||||
MiG_25PD,
|
||||
MiG_29A,
|
||||
MiG_29S,
|
||||
MiG_31,
|
||||
Su_24M,
|
||||
Su_25,
|
||||
Su_27,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
FF_1135M_Rezky,
|
||||
FSG_1241_1MP_Molniya,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Russia_1990 = {
|
||||
"country": "Russia",
|
||||
|
||||
@@ -1,7 +1,42 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Ka_50,
|
||||
Mi_24V,
|
||||
Mi_28N,
|
||||
Mi_8MT,
|
||||
)
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
L_39ZA,
|
||||
MiG_29S,
|
||||
MiG_31,
|
||||
Su_24M,
|
||||
Su_25,
|
||||
Su_25T,
|
||||
Su_27,
|
||||
Su_30,
|
||||
Su_33,
|
||||
Su_34,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
FF_1135M_Rezky,
|
||||
FSG_1241_1MP_Molniya,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Russia_2010 = {
|
||||
"country": "Russia",
|
||||
|
||||
@@ -1,6 +1,26 @@
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.planes import (
|
||||
AV8BNA,
|
||||
C_101CC,
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
F_5E_3,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Spain_1990 = {
|
||||
"country": "Spain",
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
from dcs.vehicles import *
|
||||
from dcs.ships import *
|
||||
from dcs.planes import *
|
||||
from dcs.helicopters import *
|
||||
from dcs.helicopters import (
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AJS37,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Sweden_1990 = {
|
||||
"country": "Sweden",
|
||||
|
||||
@@ -1,6 +1,35 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Mi_24V,
|
||||
Mi_8MT,
|
||||
SA342L,
|
||||
SA342M,
|
||||
)
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
L_39ZA,
|
||||
MiG_15bis,
|
||||
MiG_19P,
|
||||
MiG_21Bis,
|
||||
MiG_23MLD,
|
||||
MiG_25PD,
|
||||
MiG_29S,
|
||||
SpitfireLFMkIX,
|
||||
SpitfireLFMkIXCW,
|
||||
Su_17M4,
|
||||
Su_24M,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Syria_2011 = {
|
||||
"country": "Syria",
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_1W,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_16C_50,
|
||||
F_4E,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Turkey_2005 = {
|
||||
"country": "Turkey",
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_64D,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_16C_50,
|
||||
KC130,
|
||||
KC_135,
|
||||
M_2000C,
|
||||
Mirage_2000_5,
|
||||
WingLoong_I,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
UAE_2005 = {
|
||||
"country": "United Arab Emirates",
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.planes import (
|
||||
A_20G,
|
||||
B_17G,
|
||||
P_47D_30,
|
||||
P_51D,
|
||||
P_51D_30_NA,
|
||||
SpitfireLFMkIX,
|
||||
SpitfireLFMkIXCW,
|
||||
)
|
||||
from dcs.ships import LCVP__Higgins_boat, LST_Mk_II, LS_Samuel_Chase
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from game.data.building_data import WW2_ALLIES_BUILDINGS
|
||||
from game.data.doctrine import WWII_DOCTRINE
|
||||
|
||||
@@ -1,7 +1,29 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_64A,
|
||||
SA342M,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AV8BNA,
|
||||
C_130,
|
||||
E_3A,
|
||||
F_4E,
|
||||
KC130,
|
||||
KC_135,
|
||||
Tornado_GR4,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
UnitedKingdom_1990 = {
|
||||
"country": "UK",
|
||||
|
||||
@@ -1,7 +1,33 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
Mi_24V,
|
||||
Mi_8MT,
|
||||
)
|
||||
from dcs.planes import (
|
||||
A_50,
|
||||
An_26B,
|
||||
An_30M,
|
||||
IL_76MD,
|
||||
IL_78M,
|
||||
L_39ZA,
|
||||
MiG_29S,
|
||||
Su_24M,
|
||||
Su_25,
|
||||
Su_25T,
|
||||
Su_27,
|
||||
Yak_40,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Bulk_cargo_ship_Yakushev,
|
||||
CV_1143_5_Admiral_Kuznetsov,
|
||||
Dry_cargo_ship_Ivanov,
|
||||
Tanker_Elnya_160,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
Ukraine_2010 = {
|
||||
"country": "Ukraine",
|
||||
|
||||
@@ -1,7 +1,36 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_64D,
|
||||
Ka_50,
|
||||
SA342L,
|
||||
SA342M,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
F_15C,
|
||||
F_16C_50,
|
||||
F_5E_3,
|
||||
KC130,
|
||||
KC_135,
|
||||
Su_27,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
USS_Arleigh_Burke_IIa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
US_Aggressors = {
|
||||
"country": "USAF Aggressors",
|
||||
|
||||
@@ -1,6 +1,20 @@
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.planes import (
|
||||
A_20G,
|
||||
B_17G,
|
||||
P_47D_30,
|
||||
P_51D,
|
||||
P_51D_30_NA,
|
||||
SpitfireLFMkIX,
|
||||
SpitfireLFMkIXCW,
|
||||
)
|
||||
from dcs.ships import LCVP__Higgins_boat, LST_Mk_II, LS_Samuel_Chase
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
from game.data.building_data import WW2_ALLIES_BUILDINGS
|
||||
from game.data.doctrine import WWII_DOCTRINE
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
from dcs.vehicles import *
|
||||
from dcs.ships import *
|
||||
from dcs.planes import *
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_86F_Sabre,
|
||||
KC130,
|
||||
KC_135,
|
||||
P_51D,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
USA_1955 = {
|
||||
"country": "USA",
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
from dcs.vehicles import *
|
||||
from dcs.ships import *
|
||||
from dcs.planes import *
|
||||
from dcs.helicopters import *
|
||||
from dcs.helicopters import (
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
C_130,
|
||||
E_3A,
|
||||
F_86F_Sabre,
|
||||
KC130,
|
||||
KC_135,
|
||||
P_51D,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
USA_1960 = {
|
||||
"country": "USA",
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
B_52H,
|
||||
C_130,
|
||||
E_3A,
|
||||
F_4E,
|
||||
F_5E_3,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
USA_1965 = {
|
||||
"country": "USA",
|
||||
|
||||
@@ -1,7 +1,34 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_64A,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AV8BNA,
|
||||
A_10A,
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
F_14B,
|
||||
F_15C,
|
||||
F_15E,
|
||||
F_16C_50,
|
||||
KC130,
|
||||
KC_135,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Oliver_Hazzard_Perry_class,
|
||||
Ticonderoga_class,
|
||||
USS_Arleigh_Burke_IIa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
USA_1990 = {
|
||||
"country": "USA",
|
||||
|
||||
@@ -1,7 +1,36 @@
|
||||
from dcs.helicopters import *
|
||||
from dcs.planes import *
|
||||
from dcs.ships import *
|
||||
from dcs.vehicles import *
|
||||
from dcs.helicopters import (
|
||||
AH_64D,
|
||||
UH_1H,
|
||||
)
|
||||
from dcs.planes import (
|
||||
AV8BNA,
|
||||
A_10C,
|
||||
A_10C_2,
|
||||
C_130,
|
||||
E_3A,
|
||||
FA_18C_hornet,
|
||||
F_14B,
|
||||
F_15C,
|
||||
F_15E,
|
||||
F_16C_50,
|
||||
KC130,
|
||||
KC_135,
|
||||
MQ_9_Reaper,
|
||||
)
|
||||
from dcs.ships import (
|
||||
Armed_speedboat,
|
||||
CVN_74_John_C__Stennis,
|
||||
LHA_1_Tarawa,
|
||||
Ticonderoga_class,
|
||||
USS_Arleigh_Burke_IIa,
|
||||
)
|
||||
from dcs.vehicles import (
|
||||
AirDefence,
|
||||
Armor,
|
||||
Artillery,
|
||||
Infantry,
|
||||
Unarmed,
|
||||
)
|
||||
|
||||
USA_2005 = {
|
||||
"country": "USA",
|
||||
|
||||
63
game/game.py
63
game/game.py
@@ -1,6 +1,18 @@
|
||||
import logging
|
||||
import math
|
||||
import random
|
||||
import sys
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Any, Dict, List
|
||||
|
||||
from game.db import REWARDS, PLAYER_BUDGET_BASE, sys
|
||||
from dcs.action import Coalition
|
||||
from dcs.mapping import Point
|
||||
from dcs.task import CAP, CAS, PinpointStrike, Task
|
||||
from dcs.unittype import UnitType
|
||||
from dcs.vehicles import AirDefence
|
||||
|
||||
from game import db
|
||||
from game.db import PLAYER_BUDGET_BASE, REWARDS
|
||||
from game.inventory import GlobalAircraftInventory
|
||||
from game.models.game_stats import GameStats
|
||||
from gen.ato import AirTaskingOrder
|
||||
@@ -8,10 +20,15 @@ from gen.conflictgen import Conflict
|
||||
from gen.flights.ai_flight_planner import CoalitionMissionPlanner
|
||||
from gen.flights.closestairfields import ObjectiveDistanceCache
|
||||
from gen.ground_forces.ai_ground_planner import GroundPlanner
|
||||
from .event import *
|
||||
from theater import ConflictTheater, ControlPoint
|
||||
from theater.conflicttheater import IMPORTANCE_HIGH, IMPORTANCE_LOW
|
||||
from . import persistency
|
||||
from .debriefing import Debriefing
|
||||
from .event.event import Event, UnitsDeliveryEvent
|
||||
from .event.frontlineattack import FrontlineAttackEvent
|
||||
from .infos.information import Information
|
||||
from .settings import Settings
|
||||
|
||||
|
||||
COMMISION_UNIT_VARIETY = 4
|
||||
COMMISION_LIMITS_SCALE = 1.5
|
||||
COMMISION_LIMITS_FACTORS = {
|
||||
@@ -50,20 +67,11 @@ PLAYER_BUDGET_IMPORTANCE_LOG = 2
|
||||
|
||||
|
||||
class Game:
|
||||
settings = None # type: Settings
|
||||
budget = PLAYER_BUDGET_INITIAL
|
||||
events = None # type: typing.List[Event]
|
||||
pending_transfers = None # type: typing.Dict[]
|
||||
ignored_cps = None # type: typing.Collection[ControlPoint]
|
||||
turn = 0
|
||||
game_stats: GameStats = None
|
||||
|
||||
current_unit_id = 0
|
||||
current_group_id = 0
|
||||
|
||||
def __init__(self, player_name: str, enemy_name: str, theater: ConflictTheater, start_date: datetime, settings):
|
||||
def __init__(self, player_name: str, enemy_name: str,
|
||||
theater: ConflictTheater, start_date: datetime,
|
||||
settings: Settings):
|
||||
self.settings = settings
|
||||
self.events = []
|
||||
self.events: List[Event] = []
|
||||
self.theater = theater
|
||||
self.player_name = player_name
|
||||
self.player_country = db.FACTIONS[player_name]["country"]
|
||||
@@ -73,14 +81,15 @@ class Game:
|
||||
self.date = datetime(start_date.year, start_date.month, start_date.day)
|
||||
self.game_stats = GameStats()
|
||||
self.game_stats.update(self)
|
||||
self.ground_planners = {}
|
||||
self.ground_planners: Dict[int, GroundPlanner] = {}
|
||||
self.informations = []
|
||||
self.informations.append(Information("Game Start", "-" * 40, 0))
|
||||
self.__culling_points = self.compute_conflicts_position()
|
||||
self.__frontlineData = []
|
||||
self.__destroyed_units = []
|
||||
self.jtacs = []
|
||||
self.__destroyed_units: List[str] = []
|
||||
self.savepath = ""
|
||||
self.budget = PLAYER_BUDGET_INITIAL
|
||||
self.current_unit_id = 0
|
||||
self.current_group_id = 0
|
||||
|
||||
self.blue_ato = AirTaskingOrder()
|
||||
self.red_ato = AirTaskingOrder()
|
||||
@@ -128,7 +137,7 @@ class Game:
|
||||
for player_cp, enemy_cp in self.theater.conflicts(True):
|
||||
self._generate_player_event(FrontlineAttackEvent, player_cp, enemy_cp)
|
||||
|
||||
def commision_unit_types(self, cp: ControlPoint, for_task: Task) -> typing.Collection[UnitType]:
|
||||
def commision_unit_types(self, cp: ControlPoint, for_task: Task) -> List[UnitType]:
|
||||
importance_factor = (cp.importance - IMPORTANCE_LOW) / (IMPORTANCE_HIGH - IMPORTANCE_LOW)
|
||||
|
||||
if for_task == AirDefence and not self.settings.sams:
|
||||
@@ -209,7 +218,7 @@ class Game:
|
||||
def on_load(self) -> None:
|
||||
ObjectiveDistanceCache.set_theater(self.theater)
|
||||
|
||||
def pass_turn(self, no_action=False, ignored_cps: typing.Collection[ControlPoint] = None):
|
||||
def pass_turn(self, no_action=False):
|
||||
logging.info("Pass turn")
|
||||
self.informations.append(Information("End of turn #" + str(self.turn), "-" * 40, 0))
|
||||
self.turn = self.turn + 1
|
||||
@@ -233,11 +242,7 @@ class Game:
|
||||
if not cp.is_carrier and not cp.is_lha:
|
||||
cp.base.affect_strength(-PLAYER_BASE_STRENGTH_RECOVERY)
|
||||
|
||||
self.ignored_cps = []
|
||||
if ignored_cps:
|
||||
self.ignored_cps = ignored_cps
|
||||
|
||||
self.events = [] # type: typing.List[Event]
|
||||
self.events = []
|
||||
self._generate_events()
|
||||
|
||||
# Update statistics
|
||||
@@ -424,10 +429,10 @@ class Game:
|
||||
return 1
|
||||
|
||||
def get_player_coalition(self):
|
||||
return dcs.action.Coalition.Blue
|
||||
return Coalition.Blue
|
||||
|
||||
def get_enemy_coalition(self):
|
||||
return dcs.action.Coalition.Red
|
||||
return Coalition.Red
|
||||
|
||||
def get_player_color(self):
|
||||
return "blue"
|
||||
|
||||
@@ -5,12 +5,13 @@ from typing import Dict, Iterable, Iterator, Set, Tuple
|
||||
from dcs.unittype import UnitType
|
||||
|
||||
from gen.flights.flight import Flight
|
||||
from theater import ControlPoint
|
||||
|
||||
|
||||
class ControlPointAircraftInventory:
|
||||
"""Aircraft inventory for a single control point."""
|
||||
|
||||
def __init__(self, control_point: "ControlPoint") -> None:
|
||||
def __init__(self, control_point: ControlPoint) -> None:
|
||||
self.control_point = control_point
|
||||
self.inventory: Dict[UnitType, int] = defaultdict(int)
|
||||
|
||||
@@ -81,8 +82,8 @@ class ControlPointAircraftInventory:
|
||||
|
||||
class GlobalAircraftInventory:
|
||||
"""Game-wide aircraft inventory."""
|
||||
def __init__(self, control_points: Iterable["ControlPoint"]) -> None:
|
||||
self.inventories: Dict["ControlPoint", ControlPointAircraftInventory] = {
|
||||
def __init__(self, control_points: Iterable[ControlPoint]) -> None:
|
||||
self.inventories: Dict[ControlPoint, ControlPointAircraftInventory] = {
|
||||
cp: ControlPointAircraftInventory(cp) for cp in control_points
|
||||
}
|
||||
|
||||
@@ -91,7 +92,7 @@ class GlobalAircraftInventory:
|
||||
for inventory in self.inventories.values():
|
||||
inventory.clear()
|
||||
|
||||
def set_from_control_point(self, control_point: "ControlPoint") -> None:
|
||||
def set_from_control_point(self, control_point: ControlPoint) -> None:
|
||||
"""Set the control point's aircraft inventory.
|
||||
|
||||
If the inventory for the given control point has already been set for
|
||||
@@ -103,7 +104,7 @@ class GlobalAircraftInventory:
|
||||
|
||||
def for_control_point(
|
||||
self,
|
||||
control_point: "ControlPoint") -> ControlPointAircraftInventory:
|
||||
control_point: ControlPoint) -> ControlPointAircraftInventory:
|
||||
"""Returns the inventory specific to the given control point."""
|
||||
return self.inventories[control_point]
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
from typing import List
|
||||
|
||||
class FactionTurnMetadata:
|
||||
"""
|
||||
Store metadata about a faction
|
||||
@@ -31,10 +33,8 @@ class GameStats:
|
||||
Store statistics for the current game
|
||||
"""
|
||||
|
||||
data_per_turn: [GameTurnMetadata] = []
|
||||
|
||||
def __init__(self):
|
||||
self.data_per_turn = []
|
||||
self.data_per_turn: List[GameTurnMetadata] = []
|
||||
|
||||
def update(self, game):
|
||||
"""
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
from game.db import assigned_units_split
|
||||
|
||||
from .operation import *
|
||||
from dcs.terrain.terrain import Terrain
|
||||
|
||||
from gen.conflictgen import Conflict
|
||||
from .operation import Operation
|
||||
from .. import db
|
||||
|
||||
MAX_DISTANCE_BETWEEN_GROUPS = 12000
|
||||
|
||||
|
||||
@@ -1,13 +1,35 @@
|
||||
from typing import Set
|
||||
import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Set
|
||||
|
||||
from gen import *
|
||||
from gen.airfields import AIRFIELD_DATA
|
||||
from gen.beacons import load_beacons_for_terrain
|
||||
from gen.radios import RadioRegistry
|
||||
from gen.tacan import TacanRegistry
|
||||
from dcs import Mission
|
||||
from dcs.action import DoScript, DoScriptFile
|
||||
from dcs.coalition import Coalition
|
||||
from dcs.countries import country_dict
|
||||
from dcs.lua.parse import loads
|
||||
from dcs.mapping import Point
|
||||
from dcs.terrain.terrain import Terrain
|
||||
from dcs.translation import String
|
||||
from dcs.triggers import TriggerStart
|
||||
from dcs.unittype import UnitType
|
||||
|
||||
from gen import Conflict, VisualGenerator
|
||||
from gen.aircraft import AIRCRAFT_DATA, AircraftConflictGenerator, FlightData
|
||||
from gen.airfields import AIRFIELD_DATA
|
||||
from gen.airsupportgen import AirSupport, AirSupportConflictGenerator
|
||||
from gen.armor import GroundConflictGenerator, JtacInfo
|
||||
from gen.beacons import load_beacons_for_terrain
|
||||
from gen.briefinggen import BriefingGenerator
|
||||
from gen.environmentgen import EnviromentGenerator
|
||||
from gen.forcedoptionsgen import ForcedOptionsGenerator
|
||||
from gen.groundobjectsgen import GroundObjectsGenerator
|
||||
from gen.kneeboard import KneeboardGenerator
|
||||
from gen.radios import RadioFrequency, RadioRegistry
|
||||
from gen.tacan import TacanRegistry
|
||||
from gen.triggergen import TRIGGER_RADIUS_MEDIUM, TriggersGenerator
|
||||
from theater import ControlPoint
|
||||
from .. import db
|
||||
from ..debriefing import Debriefing
|
||||
|
||||
|
||||
@@ -15,16 +37,15 @@ class Operation:
|
||||
attackers_starting_position = None # type: db.StartingPosition
|
||||
defenders_starting_position = None # type: db.StartingPosition
|
||||
|
||||
current_mission = None # type: dcs.Mission
|
||||
regular_mission = None # type: dcs.Mission
|
||||
quick_mission = None # type: dcs.Mission
|
||||
current_mission = None # type: Mission
|
||||
regular_mission = None # type: Mission
|
||||
quick_mission = None # type: Mission
|
||||
conflict = None # type: Conflict
|
||||
armorgen = None # type: ArmorConflictGenerator
|
||||
airgen = None # type: AircraftConflictGenerator
|
||||
triggersgen = None # type: TriggersGenerator
|
||||
airsupportgen = None # type: AirSupportConflictGenerator
|
||||
visualgen = None # type: VisualGenerator
|
||||
envgen = None # type: EnvironmentGenerator
|
||||
envgen = None # type: EnviromentGenerator
|
||||
groundobjectgen = None # type: GroundObjectsGenerator
|
||||
briefinggen = None # type: BriefingGenerator
|
||||
forcedoptionsgen = None # type: ForcedOptionsGenerator
|
||||
@@ -43,7 +64,7 @@ class Operation:
|
||||
defender_name: str,
|
||||
from_cp: ControlPoint,
|
||||
departure_cp: ControlPoint,
|
||||
to_cp: ControlPoint = None):
|
||||
to_cp: ControlPoint):
|
||||
self.game = game
|
||||
self.attacker_name = attacker_name
|
||||
self.attacker_country = db.FACTIONS[attacker_name]["country"]
|
||||
@@ -55,7 +76,7 @@ class Operation:
|
||||
self.to_cp = to_cp
|
||||
self.is_quick = False
|
||||
|
||||
def units_of(self, country_name: str) -> typing.Collection[UnitType]:
|
||||
def units_of(self, country_name: str) -> List[UnitType]:
|
||||
return []
|
||||
|
||||
def is_successfull(self, debriefing: Debriefing) -> bool:
|
||||
@@ -75,7 +96,7 @@ class Operation:
|
||||
with open("resources/default_options.lua", "r") as f:
|
||||
options_dict = loads(f.read())["options"]
|
||||
|
||||
self.current_mission = dcs.Mission(terrain)
|
||||
self.current_mission = Mission(terrain)
|
||||
|
||||
print(self.game.player_country)
|
||||
print(country_dict[db.country_id_from_name(self.game.player_country)])
|
||||
@@ -106,7 +127,11 @@ class Operation:
|
||||
self.defenders_starting_position = None
|
||||
else:
|
||||
self.attackers_starting_position = self.departure_cp.at
|
||||
self.defenders_starting_position = self.to_cp.at
|
||||
# TODO: Is this possible?
|
||||
if self.to_cp is not None:
|
||||
self.defenders_starting_position = self.to_cp.at
|
||||
else:
|
||||
self.defenders_starting_position = None
|
||||
|
||||
def generate(self):
|
||||
radio_registry = RadioRegistry()
|
||||
@@ -374,6 +399,7 @@ class Operation:
|
||||
logging.warning(f"No aircraft data for {airframe.id}")
|
||||
return
|
||||
|
||||
aircraft_data.channel_allocator.assign_channels_for_flight(
|
||||
flight, air_support
|
||||
)
|
||||
if aircraft_data.channel_allocator is not None:
|
||||
aircraft_data.channel_allocator.assign_channels_for_flight(
|
||||
flight, air_support
|
||||
)
|
||||
|
||||
@@ -2,8 +2,9 @@ import logging
|
||||
import os
|
||||
import pickle
|
||||
import shutil
|
||||
from typing import Optional
|
||||
|
||||
_dcs_saved_game_folder = None # type: str
|
||||
_dcs_saved_game_folder: Optional[str] = None
|
||||
_file_abs_path = None
|
||||
|
||||
def setup(user_folder: str):
|
||||
|
||||
Reference in New Issue
Block a user