Formatting

Json spoiler tied to jsonout arg
Fixed Default Link sprite button again
Removed odd return from local_path (need to test this with bundle)
This commit is contained in:
aerinon
2020-04-09 17:02:40 -06:00
parent b86ffc3378
commit 8e7ed89723
3 changed files with 13 additions and 13 deletions

10
Main.py
View File

@@ -255,7 +255,7 @@ def main(args, seed=None, fish=None):
"mscb": mcsb_name, # 9
"retro": world.retro[player], # A
"progressive": world.progressive, # B
"hints": str(world.hints[player]) # C
"hints": 'True' if world.hints[player] else 'False' # C
}
# 0 1 2 3 4 5 6 7 8 9 A B C
outfilesuffix = ('_%s_%s-%s-%s-%s%s_%s_%s-%s%s%s%s%s' % (
@@ -303,9 +303,11 @@ def main(args, seed=None, fish=None):
print(json.dumps({**jsonout, 'spoiler': world.spoiler.to_json()}))
elif args.create_spoiler:
logger.info(world.fish.translate("cli","cli","patching.spoiler"))
world.spoiler.to_file(output_path('%s_Spoiler.txt' % outfilebase))
with open(output_path('%s_Spoiler.json' % outfilebase), 'w') as outfile:
outfile.write(world.spoiler.to_json())
if args.jsonout:
with open(output_path('%s_Spoiler.json' % outfilebase), 'w') as outfile:
outfile.write(world.spoiler.to_json())
else:
world.spoiler.to_file(output_path('%s_Spoiler.txt' % outfilebase))
YES = world.fish.translate("cli","cli","yes")
NO = world.fish.translate("cli","cli","no")