Fix mismatch between terrain names

Pydcs & Retribution don't always match up...
This commit is contained in:
Raffson 2024-12-28 20:40:42 +01:00
parent 56e0c901c5
commit f36526b5de
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99

View File

@ -54,6 +54,13 @@ class ConflictTheater:
@staticmethod
def landmap_path_for_terrain_name(terrain_name: str) -> Path:
theather_mapping = { # map Pydcs name to respective directory name
"PersianGulf": "persian gulf",
"TheChannel": "the channel",
"MarianaIslands": "marianaislands",
}
if terrain_name in theather_mapping:
terrain_name = theather_mapping[terrain_name]
for theater_dir in THEATER_RESOURCE_DIR.iterdir():
if theater_dir.name.lower() in terrain_name.lower():
return theater_dir / "landmap.p"