Meta-Mystery

This commit is contained in:
Fabian Dill
2020-02-18 09:14:31 +01:00
parent f66467c2f5
commit 0220575c50
5 changed files with 122 additions and 47 deletions

View File

@@ -40,6 +40,7 @@ if __name__ == "__main__":
zip_spoiler = multi_mystery_options["zip_spoiler"]
zip_multidata = multi_mystery_options["zip_multidata"]
player_name = multi_mystery_options["player_name"]
meta_file_path = multi_mystery_options["meta_file_path"]
py_version = f"{sys.version_info.major}.{sys.version_info.minor}"
@@ -51,7 +52,8 @@ if __name__ == "__main__":
player_files = []
os.makedirs(player_files_path, exist_ok=True)
for file in os.listdir(player_files_path):
if file.lower().endswith(".yaml"):
lfile = file.lower()
if lfile.endswith(".yaml") and lfile != meta_file_path.lower():
player_files.append(file)
print(f"Player {file[:-5]} found.")
player_count = len(player_files)
@@ -75,7 +77,15 @@ if __name__ == "__main__":
command = f"{basemysterycommand} --multi {len(player_files)} {player_string} " \
f"--names {','.join(player_names)} --enemizercli {enemizer_path} " \
f"--outputpath {output_path}" + " --create_spoiler" if create_spoiler else "" + " --race" if race else ""
f"--outputpath {output_path}"
if create_spoiler:
command += " --create_spoiler"
if race:
command += " --race"
if os.path.exists(os.path.join(player_files_path, meta_file_path)):
command += f" --meta {os.path.join(player_files_path, meta_file_path)}"
print(command)
import time
start = time.perf_counter()