Fix --securerandom to not be mad at not having a seed

This commit is contained in:
2021-07-08 20:26:55 -07:00
parent 2f836ff47c
commit 722a7efc70
5 changed files with 8 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ import json
import logging
import os
import RaceRandom as random
import string
import time
import zlib
@@ -87,7 +88,7 @@ def main(args, seed=None, fish=None):
random.seed(world.seed)
if args.securerandom:
world.seed = None
world.seed = ''.join(random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for _ in range(9))
world.remote_items = args.remote_items.copy()
world.mapshuffle = args.mapshuffle.copy()
@@ -368,7 +369,7 @@ def main(args, seed=None, fish=None):
logger.info(world.fish.translate("cli","cli","made.playthrough") % (YES if (args.calc_playthrough) else NO))
logger.info(world.fish.translate("cli","cli","made.spoiler") % (YES if (not args.jsonout and args.create_spoiler) else NO))
logger.info(world.fish.translate("cli","cli","used.enemizer") % (YES if enemized else NO))
logger.info(world.fish.translate("cli","cli","seed") + ": %d", world.seed)
logger.info(world.fish.translate("cli","cli","seed") + ": %s", world.seed)
logger.info(world.fish.translate("cli","cli","total.time"), time.perf_counter() - start)
# print_wiki_doors_by_room(dungeon_regions,world,1)