From a0c61bf73a366265dff9ef1fb35a6e39897cff22 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 24 Oct 2020 17:23:09 +0200 Subject: [PATCH] Authors informations are loaded in Campaign object (to be displayed in UI later) --- qt_ui/windows/newgame/QCampaignList.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt_ui/windows/newgame/QCampaignList.py b/qt_ui/windows/newgame/QCampaignList.py index 5d3de21c..1c3ccf7d 100644 --- a/qt_ui/windows/newgame/QCampaignList.py +++ b/qt_ui/windows/newgame/QCampaignList.py @@ -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))