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

@@ -244,7 +244,7 @@ class ConflictTheater:
raise KeyError(f"Cannot find ControlPoint with ID {id}")
@staticmethod
def from_json(directory: Path, data: Dict[str, Any]) -> ConflictTheater:
def from_file_data(directory: Path, data: Dict[str, Any]) -> ConflictTheater:
theaters = {
"Caucasus": CaucasusTheater,
"Nevada": NevadaTheater,