mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Ground war rework
This commit is contained in:
@@ -7,10 +7,10 @@ from dcs.terrain import Airport
|
||||
from dcs.ships import CVN_74_John_C__Stennis, LHA_1_Tarawa, CV_1143_5_Admiral_Kuznetsov
|
||||
|
||||
from game import db
|
||||
from gen.ground_forces.combat_stance import CombatStance
|
||||
from .theatergroundobject import TheaterGroundObject
|
||||
|
||||
|
||||
|
||||
class ControlPointType(Enum):
|
||||
AIRBASE = 0 # An airbase with slot for everything
|
||||
AIRCRAFT_CARRIER_GROUP = 1 # A group with a Stennis type carrier (F/A-18, F-14 compatible)
|
||||
@@ -56,6 +56,7 @@ class ControlPoint:
|
||||
self.connected_points = []
|
||||
self.base = theater.base.Base()
|
||||
self.cptype = cptype
|
||||
self.stances = {}
|
||||
|
||||
@classmethod
|
||||
def from_airport(cls, airport: Airport, radials: typing.Collection[int], size: int, importance: float, has_frontline=True):
|
||||
@@ -75,6 +76,10 @@ class ControlPoint:
|
||||
def is_global(self):
|
||||
return not self.connected_points
|
||||
|
||||
@property
|
||||
def is_carrier(self):
|
||||
return self.cptype in [ControlPointType.AIRCRAFT_CARRIER_GROUP, ControlPointType.LHA_GROUP]
|
||||
|
||||
@property
|
||||
def sea_radials(self) -> typing.Collection[int]:
|
||||
# TODO: fix imports
|
||||
@@ -87,6 +92,7 @@ class ControlPoint:
|
||||
|
||||
def connect(self, to):
|
||||
self.connected_points.append(to)
|
||||
self.stances[to.id] = CombatStance.DEFENSIVE
|
||||
|
||||
def has_runway(self):
|
||||
"""
|
||||
|
||||
@@ -9,8 +9,9 @@ from .landmap import load_landmap
|
||||
class PersianGulfTheater(ConflictTheater):
|
||||
terrain = dcs.terrain.PersianGulf()
|
||||
overview_image = "persiangulf.gif"
|
||||
reference_points = {(persiangulf.Sir_Abu_Nuayr.position.x, persiangulf.Sir_Abu_Nuayr.position.y): (321*4, 145*4),
|
||||
(persiangulf.Sirri_Island.position.x, persiangulf.Sirri_Island.position.y): (347*4, 82*4), }
|
||||
reference_points = {
|
||||
(persiangulf.Sir_Abu_Nuayr.position.x, persiangulf.Sir_Abu_Nuayr.position.y): (423 * 4, 150 * 4),
|
||||
(persiangulf.Sirri_Island.position.x, persiangulf.Sirri_Island.position.y): (447 * 4, 82 * 4), }
|
||||
landmap = load_landmap("resources\\gulflandmap.p")
|
||||
daytime_map = {
|
||||
"dawn": (6, 8),
|
||||
@@ -94,8 +95,8 @@ class IranianCampaign(ConflictTheater):
|
||||
|
||||
terrain = dcs.terrain.PersianGulf()
|
||||
overview_image = "persiangulf.gif"
|
||||
reference_points = {(persiangulf.Sir_Abu_Nuayr.position.x, persiangulf.Sir_Abu_Nuayr.position.y): (321*4, 145*4),
|
||||
(persiangulf.Sirri_Island.position.x, persiangulf.Sirri_Island.position.y): (347*4, 82*4), }
|
||||
reference_points = {(persiangulf.Sir_Abu_Nuayr.position.x, persiangulf.Sir_Abu_Nuayr.position.y): (423*4, 150*4),
|
||||
(persiangulf.Sirri_Island.position.x, persiangulf.Sirri_Island.position.y): (447*4, 82*4), }
|
||||
landmap = load_landmap("resources\\gulflandmap.p")
|
||||
daytime_map = {
|
||||
"dawn": (6, 8),
|
||||
|
||||
@@ -29,7 +29,6 @@ ABBREV_NAME = {
|
||||
"oil": "OILP"
|
||||
}
|
||||
|
||||
|
||||
CATEGORY_MAP = {
|
||||
"CARRIER": ["CARRIER"],
|
||||
"aa": ["AA"],
|
||||
|
||||
Reference in New Issue
Block a user