Allow using yaml for campaign definitions.

JSON continues to be supported as well. No additional work needed here,
just needed to allow both.
This commit is contained in:
Dan Albert
2021-08-10 18:21:52 -07:00
parent 6c7b62b8b1
commit 88d52003b3
4 changed files with 20 additions and 17 deletions

View File

@@ -231,7 +231,7 @@ def create_game(
# for loadouts) without saving the generated campaign and reloading it the normal
# way.
inject_custom_payloads(Path(persistency.base_path()))
campaign = Campaign.from_json(campaign_path)
campaign = Campaign.from_file(campaign_path)
generator = GameGenerator(
FACTIONS[blue],
FACTIONS[red],