mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Add fallback terrain icons in campaign selector (#80)
This commit is contained in:
@@ -32,6 +32,7 @@ DEFAULT_BUDGET = 2000
|
||||
class Campaign:
|
||||
name: str
|
||||
menu_thumbnail_dcs_relative_path: Path
|
||||
fallback_icon_path: Path
|
||||
authors: str
|
||||
description: str
|
||||
|
||||
@@ -90,6 +91,7 @@ class Campaign:
|
||||
return cls(
|
||||
data["name"],
|
||||
TheaterLoader(data["theater"].lower()).menu_thumbnail_dcs_relative_path,
|
||||
TheaterLoader(data["theater"].lower()).icon_path,
|
||||
data.get("authors", "???"),
|
||||
data.get("description", ""),
|
||||
(version.major, version.minor),
|
||||
|
||||
@@ -90,6 +90,10 @@ class TheaterLoader:
|
||||
def landmap_path(self) -> Path:
|
||||
return self.descriptor_path.with_name("landmap.p")
|
||||
|
||||
@property
|
||||
def icon_path(self) -> Path:
|
||||
return self.descriptor_path.with_name("icon.gif")
|
||||
|
||||
@property
|
||||
def menu_thumbnail_dcs_relative_path(self) -> Path:
|
||||
with self.descriptor_path.open() as descriptor_file:
|
||||
|
||||
Reference in New Issue
Block a user