fix mystery naming with --samesettings

This commit is contained in:
Fabian Dill 2020-04-22 13:52:03 +02:00
parent fa2cf20b01
commit 5a6035f6b7
1 changed files with 7 additions and 4 deletions

View File

@ -121,7 +121,8 @@ def main():
try:
settings = settings_cache[path] if settings_cache[path] else roll_settings(weights_cache[path])
if settings.sprite is not None and not os.path.isfile(settings.sprite) and not get_sprite_from_name(settings.sprite):
logging.warning(f"Warning: The chosen sprite, \"{settings.sprite}\", for yaml \"{path}\", does not exist.")
logging.warning(
f"Warning: The chosen sprite, \"{settings.sprite}\", for yaml \"{path}\", does not exist.")
for k, v in vars(settings).items():
if v is not None:
getattr(erargs, k)[player] = v
@ -131,9 +132,11 @@ def main():
raise RuntimeError(f'No weights specified for player {player}')
if not erargs.name[player]:
erargs.name[player] = os.path.split(path)[-1].split(".")[0]
erargs.names = ",".join(erargs.name[i] for i in range(1, args.multi + 1))
del(erargs.name)
if args.samesettings:
erargs.names = ""
else:
erargs.names = ",".join(erargs.name[i] for i in range(1, args.multi + 1))
del (erargs.name)
ERmain(erargs, seed)