Authors informations are loaded in Campaign object (to be displayed in UI later)

This commit is contained in:
Khopa 2020-10-24 17:23:09 +02:00
parent d6c19a8aff
commit a0c61bf73a

View File

@ -19,6 +19,7 @@ from theater import ConflictTheater
class Campaign:
name: str
icon_name: str
authors: str
theater: ConflictTheater
@classmethod
@ -27,7 +28,7 @@ class Campaign:
data = json.load(campaign_file)
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))