Merge branch 'main' into breaking_changes

This commit is contained in:
Fabian Dill
2021-03-14 07:04:40 +01:00
5 changed files with 14 additions and 9 deletions

View File

@@ -188,7 +188,7 @@ def main(args=None, callback=ERmain):
if path == args.weights:
settings.name = f"Player{player}"
elif not settings.name:
settings.name = os.path.split(path)[-1].split(".")[0]
settings.name = os.path.splitext(os.path.split(path)[-1])[0]
if "-" not in settings.shuffle and settings.shuffle != "vanilla":
settings.shuffle += f"-{random.randint(0, 2 ** 64)}"
@@ -214,7 +214,7 @@ def main(args=None, callback=ERmain):
if path == args.weights: # if name came from the weights file, just use base player name
erargs.name[player] = f"Player{player}"
elif not erargs.name[player]: # if name was not specified, generate it from filename
erargs.name[player] = os.path.split(path)[-1].split(".")[0]
erargs.name[player] = os.path.splitext(os.path.split(path)[-1])[0]
new_name = []
name_counter[erargs.name[player]] += 1
for name in erargs.name[player].split("%%"):