Load map icons directly from DCS.

If the user's DCS directory is not configured correctly this will
degrade by not showing an icon. Otherwise (and typically) we get nicer
looking icons for each theater, and we don't have to make these for each
new map.
This commit is contained in:
Dan Albert
2022-09-27 19:09:19 -07:00
committed by Raffson
parent 868c38b782
commit 7e8f734309
11 changed files with 14 additions and 15 deletions

View File

@@ -31,7 +31,7 @@ DEFAULT_BUDGET = 2000
@dataclass(frozen=True)
class Campaign:
name: str
icon_name: str
menu_thumbnail_dcs_relative_path: Path
authors: str
description: str
@@ -89,7 +89,7 @@ class Campaign:
return cls(
data["name"],
f"Terrain_{sanitized_theater}",
TheaterLoader(data["theater"].lower()).menu_thumbnail_dcs_relative_path,
data.get("authors", "???"),
data.get("description", ""),
(version.major, version.minor),