diff --git a/gen/briefinggen.py b/gen/briefinggen.py index b794f3b9..d8fd32a8 100644 --- a/gen/briefinggen.py +++ b/gen/briefinggen.py @@ -65,10 +65,9 @@ class BriefingGenerator: self.description += "-" * 50 + "\n" for name, freq in self.freqs: self.description += "\n{}: {}".format(name, freq) - + self.description += "\n-" * 50 + "\n" for cp in self.game.theater.controlpoints: if cp.captured and cp.cptype in [ControlPointType.LHA_GROUP, ControlPointType.AIRCRAFT_CARRIER_GROUP]: - self.description += "\n" self.description += cp.name + " TACAN : " self.description += str(cp.tacanN) @@ -78,6 +77,10 @@ class BriefingGenerator: self.description += "X" self.description += " " + str(cp.tacanI) + "\n" + if cp.cptype == ControlPointType.AIRCRAFT_CARRIER_GROUP and hasattr(cp, "icls"): + self.description += "ICLS Channel : " + str(cp.icls) + "\n" + self.description += "-" * 50 + "\n" + self.m.set_description_text(self.description) diff --git a/gen/groundobjectsgen.py b/gen/groundobjectsgen.py index a5f6681e..9469a0e5 100644 --- a/gen/groundobjectsgen.py +++ b/gen/groundobjectsgen.py @@ -103,6 +103,9 @@ class GroundObjectsGenerator: modeChannel = "X" if not cp.tacanY else "Y" sg.points[0].tasks.append(ActivateBeaconCommand(channel=cp.tacanN, modechannel=modeChannel, callsign=cp.tacanI, unit_id=sg.units[0].id)) + if ground_object.dcs_identifier == "CARRIER" and hasattr(cp, "icls"): + sg.points[0].tasks.append(ActivateICLSCommand(cp.icls, unit_id=sg.units[0].id)) + else: if ground_object.dcs_identifier in warehouse_map: static_type = warehouse_map[ground_object.dcs_identifier] diff --git a/theater/controlpoint.py b/theater/controlpoint.py index 90aa213c..1bead07d 100644 --- a/theater/controlpoint.py +++ b/theater/controlpoint.py @@ -27,6 +27,7 @@ class ControlPoint: full_name = None # type: str base = None # type: theater.base.Base at = None # type: db.StartPosition + icls = 1 connected_points = None # type: typing.List[ControlPoint] ground_objects = None # type: typing.List[TheaterGroundObject] @@ -36,6 +37,8 @@ class ControlPoint: frontline_offset = 0.0 cptype: ControlPointType = None + ICLS_counter = 1 + def __init__(self, id: int, name: str, position: Point, at, radials: typing.Collection[int], size: int, importance: float, has_frontline=True, cptype=ControlPointType.AIRBASE): import theater.base @@ -60,6 +63,7 @@ class ControlPoint: self.tacanY = False self.tacanN = None self.tacanI = "TAC" + self.icls = 0 @classmethod def from_airport(cls, airport: Airport, radials: typing.Collection[int], size: int, importance: float, has_frontline=True): @@ -74,6 +78,8 @@ class ControlPoint: cp.tacanY = random.choice([True, False]) cp.tacanN = random.randint(26, 49) cp.tacanI = random.choice(["STE", "CVN", "CVH", "CCV", "ACC", "ARC", "GER", "ABR", "LIN", "TRU"]) + ControlPoint.ICLS_counter = ControlPoint.ICLS_counter + 1 + cp.icls = ControlPoint.ICLS_counter return cp @classmethod