From 28483a6c1461ef8005c1560d1a5312b14bcf9934 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Thu, 20 Oct 2022 23:57:02 +0200 Subject: [PATCH] Generate: don't try to include meta or filler weights file as player --- Generate.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Generate.py b/Generate.py index 57d060d4..f19e2370 100644 --- a/Generate.py +++ b/Generate.py @@ -154,11 +154,12 @@ def main(args=None, callback=ERmain): # sort dict for consistent results across platforms: weights_cache = {key: value for key, value in sorted(weights_cache.items())} for filename, yaml_data in weights_cache.items(): - for yaml in yaml_data: - print(f"P{player_id} Weights: {filename} >> " - f"{get_choice('description', yaml, 'No description specified')}") - player_files[player_id] = filename - player_id += 1 + if filename not in {args.meta_file_path, args.weights_file_path}: + for yaml in yaml_data: + print(f"P{player_id} Weights: {filename} >> " + f"{get_choice('description', yaml, 'No description specified')}") + player_files[player_id] = filename + player_id += 1 args.multi = max(player_id - 1, args.multi) print(f"Generating for {args.multi} player{'s' if args.multi > 1 else ''}, {seed_name} Seed {seed} with plando: "