diff --git a/changelog.md b/changelog.md index 06e98544..5aab0539 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,7 @@ Saves from 4.0.0 are compatible with 4.1.0. ## Features/Improvements * **[Campaign]** Air defense sites now generate a fixed number of launchers per type. +* **[Campaign]** Added support for Mariana Islands map. * **[Mission Generation]** Improvements for better support of the Skynet Plugin and long range SAMs are now acting as EWR * **[Plugins]** Increased time JTAC Autolase messages stay visible on the UI. * **[UI]** Added ability to take notes and have those notes appear as a kneeboard page. diff --git a/game/theater/conflicttheater.py b/game/theater/conflicttheater.py index 0d49b1e6..1db5cee5 100644 --- a/game/theater/conflicttheater.py +++ b/game/theater/conflicttheater.py @@ -29,6 +29,7 @@ from dcs.terrain import ( persiangulf, syria, thechannel, + marianaislands, ) from dcs.terrain.terrain import Airport, Terrain from dcs.unitgroup import ( @@ -856,3 +857,22 @@ class SyriaTheater(ConflictTheater): from .syria import PARAMETERS return PARAMETERS + + +class MarianaIslandsTheater(ConflictTheater): + terrain = marianaislands.MarianaIslands() + overview_image = "marianaislands.gif" + + landmap = load_landmap("resources\\marianaislandslandmap.p") + daytime_map = { + "dawn": (6, 8), + "day": (8, 16), + "dusk": (16, 18), + "night": (0, 5), + } + + @property + def projection_parameters(self) -> TransverseMercator: + from .marianaislands import PARAMETERS + + return PARAMETERS diff --git a/game/theater/marianaislands.py b/game/theater/marianaislands.py new file mode 100644 index 00000000..b5ddd5e1 --- /dev/null +++ b/game/theater/marianaislands.py @@ -0,0 +1,8 @@ +from game.theater.projections import TransverseMercator + +PARAMETERS = TransverseMercator( + central_meridian=147, + false_easting=238417.99999989968, + false_northing=-1491840.000000048, + scale_factor=0.9996, +) diff --git a/game/version.py b/game/version.py index bcb8b8cf..c25490e0 100644 --- a/game/version.py +++ b/game/version.py @@ -96,4 +96,7 @@ VERSION = _build_version_string() #: mission using map buildings as strike targets must check and potentially recreate #: all those objectives. This definitely affects all Syria campaigns, other maps are #: not yet verified. -CAMPAIGN_FORMAT_VERSION = (7, 0) +#: +#: Version 7.1 +#: * Support for Mariana Islands terrain +CAMPAIGN_FORMAT_VERSION = (7, 1) diff --git a/gen/airfields.py b/gen/airfields.py index 7d499cf1..7998cbf4 100644 --- a/gen/airfields.py +++ b/gen/airfields.py @@ -1521,4 +1521,47 @@ AIRFIELD_DATA = { runway_length=3953, atc=AtcData(MHz(3, 850), MHz(118, 200), MHz(38, 600), MHz(250, 200)), ), + "Antonio B. Won Pat Intl": AirfieldData( + theater="MarianaIslands", + icao="PGUM", + elevation=255, + runway_length=9359, + atc=AtcData(MHz(3, 825), MHz(118, 100), MHz(38, 550), MHz(340, 200)), + ils={ + "06": ("IGUM", MHz(110, 30)), + }, + ), + "Andersen AFB": AirfieldData( + theater="MarianaIslands", + icao="PGUA", + elevation=545, + runway_length=10490, + tacan=TacanChannel(54, TacanBand.X), + tacan_callsign="UAM", + atc=AtcData(MHz(3, 850), MHz(126, 200), MHz(38, 600), MHz(250, 100)), + ), + "Rota Intl": AirfieldData( + theater="MarianaIslands", + icao="PGRO", + elevation=568, + runway_length=6105, + atc=AtcData(MHz(3, 750), MHz(123, 600), MHz(38, 400), MHz(250, 0)), + ), + "Tinian Intl": AirfieldData( + theater="MarianaIslands", + icao="PGWT", + elevation=240, + runway_length=7777, + atc=AtcData(MHz(3, 800), MHz(123, 650), MHz(38, 500), MHz(250, 50)), + ), + "Saipan Intl": AirfieldData( + theater="MarianaIslands", + icao="PGSN", + elevation=213, + runway_length=7790, + atc=AtcData(MHz(3, 775), MHz(125, 700), MHz(38, 450), MHz(256, 900)), + ils={ + "07": ("IGSN", MHz(109, 90)), + }, + ), } diff --git a/qt_ui/uiconstants.py b/qt_ui/uiconstants.py index e36ffb7e..ad4f26e4 100644 --- a/qt_ui/uiconstants.py +++ b/qt_ui/uiconstants.py @@ -68,6 +68,7 @@ def load_icons(): ICONS["Terrain_Normandy"] = QPixmap("./resources/ui/terrain_normandy.gif") ICONS["Terrain_TheChannel"] = QPixmap("./resources/ui/terrain_channel.gif") ICONS["Terrain_Syria"] = QPixmap("./resources/ui/terrain_syria.gif") + ICONS["Terrain_Mariana"] = QPixmap("./resources/ui/terrain_mariana.gif") ICONS["Dawn"] = QPixmap("./resources/ui/conditions/timeofday/dawn.png") ICONS["Day"] = QPixmap("./resources/ui/conditions/timeofday/day.png") diff --git a/requirements.txt b/requirements.txt index 75bf846a..eeed5fc3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,7 +19,7 @@ pathspec==0.8.1 pefile==2019.4.18 Pillow==8.2.0 pre-commit==2.10.1 --e git://github.com/pydcs/dcs@7dea4f516d943c1f48454a46043b5f38d42a35f0#egg=pydcs +-e git://github.com/pydcs/dcs@75a8dd35331e8fd337ba05fe950732077433f378#egg=pydcs pyinstaller==4.3 pyinstaller-hooks-contrib==2021.1 pyparsing==2.4.7 diff --git a/resources/dcs/beacons/marianaislands.json b/resources/dcs/beacons/marianaislands.json new file mode 100644 index 00000000..da67641b --- /dev/null +++ b/resources/dcs/beacons/marianaislands.json @@ -0,0 +1,135 @@ +[ + { + "name": "MTMACAJNA", + "callsign": "AJA", + "beacon_type": 9, + "hertz": 385000, + "channel": null + }, + { + "name": "Nimitz", + "callsign": "UNZ", + "beacon_type": 6, + "hertz": 115800000, + "channel": 105 + }, + { + "name": "SAIPAN", + "callsign": "SN", + "beacon_type": 9, + "hertz": 312000, + "channel": null + }, + { + "name": "ANDERSEN", + "callsign": "UAM", + "beacon_type": 5, + "hertz": null, + "channel": 54 + }, + { + "name": "", + "callsign": "IPMY", + "beacon_type": 15, + "hertz": 110150000, + "channel": null + }, + { + "name": "", + "callsign": "IUAM", + "beacon_type": 15, + "hertz": 110100000, + "channel": null + }, + { + "name": "", + "callsign": "IYIG", + "beacon_type": 15, + "hertz": 109350000, + "channel": null + }, + { + "name": "", + "callsign": "IAND", + "beacon_type": 15, + "hertz": 109300000, + "channel": null + }, + { + "name": "", + "callsign": "IUAM", + "beacon_type": 14, + "hertz": 110100000, + "channel": null + }, + { + "name": "", + "callsign": "IAND", + "beacon_type": 14, + "hertz": 109300000, + "channel": null + }, + { + "name": "", + "callsign": "IYIG", + "beacon_type": 14, + "hertz": 109350000, + "channel": null + }, + { + "name": "", + "callsign": "IPMY", + "beacon_type": 14, + "hertz": 110150000, + "channel": null + }, + { + "name": "", + "callsign": "IGUM", + "beacon_type": 14, + "hertz": 110300000, + "channel": null + }, + { + "name": "", + "callsign": "PGUM", + "beacon_type": 15, + "hertz": 110300000, + "channel": null + }, + { + "name": "", + "callsign": "IAWD", + "beacon_type": 14, + "hertz": 110900000, + "channel": null + }, + { + "name": "", + "callsign": "PGUM", + "beacon_type": 15, + "hertz": 110900000, + "channel": null + }, + { + "name": "ROTA", + "callsign": "GRO", + "beacon_type": 9, + "hertz": 332000, + "channel": null + }, + { + "name": "", + "callsign": "IGSN", + "beacon_type": 14, + "hertz": 109900000, + "channel": null + }, + { + "name": "", + "callsign": "PGSN", + "beacon_type": 15, + "hertz": 109900000, + "channel": null + } +] \ No newline at end of file diff --git a/resources/marianaislandslandmap.p b/resources/marianaislandslandmap.p new file mode 100644 index 00000000..d11e0368 Binary files /dev/null and b/resources/marianaislandslandmap.p differ diff --git a/resources/marianasislands.gif b/resources/marianasislands.gif new file mode 100644 index 00000000..f9217dd4 Binary files /dev/null and b/resources/marianasislands.gif differ diff --git a/resources/tools/export_coordinates.py b/resources/tools/export_coordinates.py index d3605238..34006640 100644 --- a/resources/tools/export_coordinates.py +++ b/resources/tools/export_coordinates.py @@ -39,6 +39,7 @@ from dcs.terrain.persiangulf import PersianGulf from dcs.terrain.syria import Syria from dcs.terrain.terrain import Terrain from dcs.terrain.thechannel import TheChannel +from dcs.terrain.marianaislands import MarianaIslands from dcs.triggers import TriggerStart from pyproj import CRS, Transformer @@ -59,6 +60,7 @@ ARG_TO_TERRAIN_MAP = { "persiangulf": PersianGulf(), "thechannel": TheChannel(), "syria": Syria(), + "marianaislands": MarianaIslands(), } # https://gisgeography.com/central-meridian/ @@ -71,6 +73,7 @@ CENTRAL_MERIDIANS = { "persiangulf": 57, "thechannel": 3, "syria": 39, + "marianaislands": 147, } diff --git a/resources/tools/generate_frontlines.py b/resources/tools/generate_frontlines.py index 46f429fe..ced861c6 100644 --- a/resources/tools/generate_frontlines.py +++ b/resources/tools/generate_frontlines.py @@ -5,10 +5,20 @@ import argparse from pathlib import Path from typing import List, Tuple, Union, Dict -from dcs.terrain import Caucasus, PersianGulf, Syria, Nevada, Normandy, TheChannel +from dcs.terrain import ( + Caucasus, + PersianGulf, + Syria, + Nevada, + Normandy, + TheChannel, + MarianaIslands, +) from dcs import Mission -Terrain = Union[Caucasus, PersianGulf, Syria, Nevada, Normandy, TheChannel] +Terrain = Union[ + Caucasus, PersianGulf, Syria, Nevada, Normandy, TheChannel, MarianaIslands +] SAVE_PATH = Path("resources/frontlines") diff --git a/resources/tools/generate_landmap.py b/resources/tools/generate_landmap.py index b61bcc80..60f17ad4 100644 --- a/resources/tools/generate_landmap.py +++ b/resources/tools/generate_landmap.py @@ -32,7 +32,7 @@ def _geometry_collection_to_multipoly(obj: GeometryCollection) -> MultiPolygon: raise RuntimeError(f"Not sure how to convert collection to multipoly: {obj.wkt}") -for terrain in ["cau", "nev", "syria", "channel", "normandy", "gulf"]: +for terrain in ["cau", "nev", "syria", "channel", "normandy", "gulf", "marianaislands"]: print("Terrain " + terrain) m = Mission() m.load_file("./{}_terrain.miz".format(terrain)) diff --git a/resources/tools/marianaislands_terrain.miz b/resources/tools/marianaislands_terrain.miz new file mode 100644 index 00000000..69690191 Binary files /dev/null and b/resources/tools/marianaislands_terrain.miz differ diff --git a/resources/ui/terrain_marianas.gif b/resources/ui/terrain_marianas.gif new file mode 100644 index 00000000..2546cb88 Binary files /dev/null and b/resources/ui/terrain_marianas.gif differ