Directional typos on interior doors fixed.

Better batching support for mass testing of seed generation.

Generation issues fixed:
--Filler now tests with the key in the proposed location to enable alternate key rules
--Key rule checker now only considers key locations that the parent sphere did not have - better key rules
This commit is contained in:
aerinon
2020-01-02 11:15:27 -07:00
parent 59f819aebd
commit 438d765627
7 changed files with 68 additions and 38 deletions

View File

@@ -8,6 +8,7 @@ import sys
from Main import main
from Utils import is_bundled, close_console, output_path
from Fill import FillError
class ArgumentDefaultsHelpFormatter(argparse.RawTextHelpFormatter):
@@ -303,12 +304,22 @@ def start():
guiMain(args)
elif args.count is not None:
seed = args.seed
failures = []
logger = logging.getLogger('')
for _ in range(args.count):
main(seed=seed, args=args)
try:
main(seed=seed, args=args)
logger.info('Finished run %s', _+1)
except (FillError, Exception, RuntimeError) as err:
failures.append((err, seed))
logger.warning('Generation failed: %s', err)
seed = random.randint(0, 999999999)
logging.getLogger('').info('Finished run %s', _)
for fail in failures:
logger.info('%s seed failed with: %s', fail[1], fail[0])
logger.info('Generation fail rate: %f%%', 100*len(failures)/args.count)
else:
main(seed=args.seed, args=args)
if __name__ == '__main__':
start()