From f36526b5de2377752b2d7392c2b62f6dc863d201 Mon Sep 17 00:00:00 2001 From: Raffson Date: Sat, 28 Dec 2024 20:40:42 +0100 Subject: [PATCH] Fix mismatch between terrain names Pydcs & Retribution don't always match up... --- game/theater/conflicttheater.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/game/theater/conflicttheater.py b/game/theater/conflicttheater.py index b22a1e7f..405007bb 100644 --- a/game/theater/conflicttheater.py +++ b/game/theater/conflicttheater.py @@ -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"