Initial support for Germany Cold War (#518)

* Initial support of Germany Cold War terrain

* Updated with latest beacon import

* Updated changelog and ran black

* Fixed the GermanyCW landmap and naming scheme

* Temporarily changed the requirements for pydcs to my branch (will switch back when merged)

* Updated landmap for germanycw with even fewer exclusions

* Removed unnecessary changes

* Updated requirements to lastest pydcs

* Fixed naming issues for Germany

* Update pydcs to latest commit for GCW support

* Add landmap to game.theater.__init__

* Update requirements.txt

* Resolve PyCharm type-waring

* Updated pydcs and exclusion of germany

* Updated land and sea shapefiles for Germany Cold War with new map limits

---------

Co-authored-by: Raffson <Raffson@users.noreply.github.com>
This commit is contained in:
Cedric Menard 2025-07-06 13:30:00 -04:00 committed by GitHub
parent 5254ef3442
commit 9a00a60cd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
26 changed files with 2268 additions and 2 deletions

View File

@ -5,6 +5,7 @@
* **[Plugins]** Improvements to AI support for EW Script 2.0 * **[Plugins]** Improvements to AI support for EW Script 2.0
* **[Config]** New preference setting to trigger the first-start window on every start (could help in scenarios multiple Retribution instances need to run concurrently) * **[Config]** New preference setting to trigger the first-start window on every start (could help in scenarios multiple Retribution instances need to run concurrently)
* **[Modding]** Update Grinelli Designs F-22A Mod to 2.0.0 (May 2025) * **[Modding]** Update Grinelli Designs F-22A Mod to 2.0.0 (May 2025)
* **[Campaign Design]** Added support for Germany Cold War terrain by Ugra Media
* **[Options]** New option to control EPLRS-task injection in mission generator * **[Options]** New option to control EPLRS-task injection in mission generator
## Fixes ## Fixes

View File

@ -49,7 +49,9 @@ class GameJs(BaseModel):
iads_network=IadsNetworkJs.from_network(game.theater.iads_network), iads_network=IadsNetworkJs.from_network(game.theater.iads_network),
threat_zones=ThreatZoneContainerJs.for_game(game), threat_zones=ThreatZoneContainerJs.for_game(game),
navmeshes=NavMeshesJs.from_game(game), navmeshes=NavMeshesJs.from_game(game),
map_center=game.theater.terrain.map_view_default.position.latlng(), map_center=LeafletPoint.from_latlng(
game.theater.terrain.map_view_default.position.latlng()
),
unculled_zones=UnculledZoneJs.from_game(game), unculled_zones=UnculledZoneJs.from_game(game),
map_zones=MapZonesJs.from_game(game), map_zones=MapZonesJs.from_game(game),
) )

View File

@ -19,6 +19,10 @@ class LeafletPoint(BaseModel):
title = "LatLng" title = "LatLng"
@staticmethod
def from_latlng(latlng: LatLng) -> LeafletPoint:
return LeafletPoint(lat=latlng.lat, lng=latlng.lng)
LeafletLine = list[LeafletPoint] LeafletLine = list[LeafletPoint]

View File

@ -2,5 +2,6 @@ from .base import *
from .conflicttheater import * from .conflicttheater import *
from .controlpoint import * from .controlpoint import *
from .frontline import FrontLine from .frontline import FrontLine
from .landmap import *
from .missiontarget import MissionTarget from .missiontarget import MissionTarget
from .theatergroundobject import SamGroundObject from .theatergroundobject import SamGroundObject

View File

@ -12,6 +12,7 @@ from dcs.mission import Mission
from dcs.terrain.terrain import Terrain from dcs.terrain.terrain import Terrain
from shapely import geometry, LineString from shapely import geometry, LineString
from shapely.geometry import MultiPolygon, Polygon from shapely.geometry import MultiPolygon, Polygon
import shapely as shp
@dataclass(frozen=True) @dataclass(frozen=True)
@ -28,6 +29,11 @@ class Landmap:
if not self.sea_zones.is_valid: if not self.sea_zones.is_valid:
raise RuntimeError("Sea zones not valid") raise RuntimeError("Sea zones not valid")
# Generate Spatial Index using `prepare` to improve performance
shp.prepare(self.inclusion_zones)
shp.prepare(self.exclusion_zones)
shp.prepare(self.sea_zones)
@cached_property @cached_property
def inclusion_zone_only(self) -> MultiPolygon: def inclusion_zone_only(self) -> MultiPolygon:
return self.inclusion_zones - self.exclusion_zones - self.sea_zones return self.inclusion_zones - self.exclusion_zones - self.sea_zones

View File

@ -20,6 +20,7 @@ from dcs.terrain import (
Kola, Kola,
Afghanistan, Afghanistan,
Iraq, Iraq,
GermanyColdWar,
) )
from .conflicttheater import ConflictTheater, THEATER_RESOURCE_DIR from .conflicttheater import ConflictTheater, THEATER_RESOURCE_DIR
@ -39,6 +40,7 @@ ALL_TERRAINS = [
Kola(), Kola(),
Afghanistan(), Afghanistan(),
Iraq(), Iraq(),
GermanyColdWar(),
] ]
TERRAINS_BY_NAME = {t.name: t for t in ALL_TERRAINS} TERRAINS_BY_NAME = {t.name: t for t in ALL_TERRAINS}

View File

@ -33,7 +33,7 @@ pluggy==1.5.0
pre-commit==4.2.0 pre-commit==4.2.0
pydantic==2.11.0b2 pydantic==2.11.0b2
pydantic-settings==2.8.1 pydantic-settings==2.8.1
pydcs @ git+https://github.com/dcs-retribution/pydcs@4a5e3ee63d3a487841c7b88c0a5bf58811567d6c pydcs @ git+https://github.com/dcs-retribution/pydcs@4520ed28306a62c029a07becfe1f30907589c6b0
pyinstaller==5.13.2 pyinstaller==5.13.2
pyinstaller-hooks-contrib==2024.0 pyinstaller-hooks-contrib==2024.0
pyparsing==3.2.1 pyparsing==3.2.1

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -0,0 +1,44 @@
---
name: GermanyCW # Mostly based on Caucasus, could be updated with more appropriate data if necessary
timezone: +1
daytime:
dawn: [6, 9]
day: [9, 18]
dusk: [18, 20]
night: [0, 5]
climate:
day_night_temperature_difference: 9.0
seasons:
winter:
average_pressure: 29.72 # TODO: Find real-world data
average_temperature: 3.0
weather:
thunderstorm: 1
raining: 20
cloudy: 60
clear: 20
spring:
weather:
thunderstorm: 1
raining: 20
cloudy: 40
clear: 40
summer:
average_pressure: 30.02 # TODO: Find real-world data
average_temperature: 22.5
weather:
thunderstorm: 1
raining: 10
cloudy: 35
clear: 55
fall:
weather:
thunderstorm: 1
raining: 30
cloudy: 50
clear: 20
turbulence:
high_avg_yearly_turbulence_per_10cm: 9
low_avg_yearly_turbulence_per_10cm: 3.5
solar_noon_turbulence_per_10cm: 3.5
midnight_turbulence_per_10cm: -3

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

View File

@ -0,0 +1 @@
PROJCS["WGS_1972_BE_UTM_Zone_34N",GEOGCS["GCS_WGS_1972_BE",DATUM["D_WGS_1972_BE",SPHEROID["WGS_1972",6378135.0,298.26]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",21.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

View File

@ -0,0 +1 @@
UTF-8

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["WGS_1972_BE_UTM_Zone_34N",GEOGCS["GCS_WGS_1972_BE",DATUM["D_WGS_1972_BE",SPHEROID["WGS_1972",6378135.0,298.26]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",21.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
UTF-8

Binary file not shown.

View File

@ -0,0 +1 @@
PROJCS["WGS_1972_BE_UTM_Zone_34N",GEOGCS["GCS_WGS_1972_BE",DATUM["D_WGS_1972_BE",SPHEROID["WGS_1972",6378135.0,298.26]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",21.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

Binary file not shown.

Binary file not shown.