Include playthrough in JSON spoiler
This commit is contained in:
8
Main.py
8
Main.py
@@ -147,16 +147,16 @@ def main(args, seed=None):
|
|||||||
if args.create_spoiler and not args.jsonout:
|
if args.create_spoiler and not args.jsonout:
|
||||||
world.spoiler.to_file(output_path('%s_Spoiler.txt' % outfilebase))
|
world.spoiler.to_file(output_path('%s_Spoiler.txt' % outfilebase))
|
||||||
|
|
||||||
|
if not args.skip_playthrough:
|
||||||
|
logger.info('Calculating playthrough.')
|
||||||
|
create_playthrough(world)
|
||||||
|
|
||||||
if args.json_spoiler:
|
if args.json_spoiler:
|
||||||
with open(output_path('%s_Spoiler.json' % outfilebase), 'w') as outfile:
|
with open(output_path('%s_Spoiler.json' % outfilebase), 'w') as outfile:
|
||||||
outfile.write(world.spoiler.to_json())
|
outfile.write(world.spoiler.to_json())
|
||||||
with open(output_path('%s_Meta.json' % outfilebase), 'w') as outfile:
|
with open(output_path('%s_Meta.json' % outfilebase), 'w') as outfile:
|
||||||
outfile.write(json.dumps(world.spoiler.metadata))
|
outfile.write(json.dumps(world.spoiler.metadata))
|
||||||
|
|
||||||
if not args.skip_playthrough:
|
|
||||||
logger.info('Calculating playthrough.')
|
|
||||||
create_playthrough(world)
|
|
||||||
|
|
||||||
if args.jsonout:
|
if args.jsonout:
|
||||||
print(json.dumps({**jsonout, 'spoiler': world.spoiler.to_json()}))
|
print(json.dumps({**jsonout, 'spoiler': world.spoiler.to_json()}))
|
||||||
elif args.create_spoiler and not args.skip_playthrough:
|
elif args.create_spoiler and not args.skip_playthrough:
|
||||||
|
|||||||
Reference in New Issue
Block a user