mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Authors informations are loaded in Campaign object (to be displayed in UI later)
This commit is contained in:
parent
d6c19a8aff
commit
a0c61bf73a
@ -19,6 +19,7 @@ from theater import ConflictTheater
|
|||||||
class Campaign:
|
class Campaign:
|
||||||
name: str
|
name: str
|
||||||
icon_name: str
|
icon_name: str
|
||||||
|
authors: str
|
||||||
theater: ConflictTheater
|
theater: ConflictTheater
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -27,7 +28,7 @@ class Campaign:
|
|||||||
data = json.load(campaign_file)
|
data = json.load(campaign_file)
|
||||||
|
|
||||||
sanitized_theater = data["theater"].replace(" ", "")
|
sanitized_theater = data["theater"].replace(" ", "")
|
||||||
return cls(data["name"], f"Terrain_{sanitized_theater}",
|
return cls(data["name"], f"Terrain_{sanitized_theater}", data.get("authors", "???"),
|
||||||
ConflictTheater.from_json(data))
|
ConflictTheater.from_json(data))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user