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:
10
Main.py
10
Main.py
@@ -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")
|
||||
|
||||
2
Rom.py
2
Rom.py
@@ -385,7 +385,7 @@ class Sprite(object):
|
||||
|
||||
@staticmethod
|
||||
def default_link_sprite():
|
||||
return Sprite(local_path('data/default.zspr'))
|
||||
return get_sprite_from_name('Link')
|
||||
|
||||
def decode8(self, pos):
|
||||
arr = [[0 for _ in range(8)] for _ in range(8)]
|
||||
|
||||
14
Utils.py
14
Utils.py
@@ -35,8 +35,6 @@ def is_bundled():
|
||||
return getattr(sys, 'frozen', False)
|
||||
|
||||
def local_path(path):
|
||||
return path
|
||||
|
||||
if local_path.cached_path is not None:
|
||||
return os.path.join(local_path.cached_path, path)
|
||||
|
||||
@@ -260,10 +258,10 @@ def update_deprecated_args(args):
|
||||
if isinstance(argVars["hints"],dict):
|
||||
tmp = {}
|
||||
for idx in range(1,len(argVars["hints"]) + 1):
|
||||
tmp[idx] = not argVars[src] in truthy # tmp = !src
|
||||
args.hints = tmp # dest = tmp
|
||||
tmp[idx] = argVars[src] not in truthy # tmp = !src
|
||||
args.hints = tmp # dest = tmp
|
||||
else:
|
||||
args.hints = not args.no_hints in truthy # dest = !src
|
||||
args.hints = args.no_hints not in truthy # dest = !src
|
||||
# Don't do: No
|
||||
# Do: Yes
|
||||
if "hints" in argVars:
|
||||
@@ -271,10 +269,10 @@ def update_deprecated_args(args):
|
||||
if isinstance(argVars["hints"],dict):
|
||||
tmp = {}
|
||||
for idx in range(1,len(argVars["hints"]) + 1):
|
||||
tmp[idx] = not argVars[src] in truthy # tmp = !src
|
||||
args.no_hints = tmp # dest = tmp
|
||||
tmp[idx] = argVars[src] not in truthy # tmp = !src
|
||||
args.no_hints = tmp # dest = tmp
|
||||
else:
|
||||
args.no_hints = not args.hints in truthy # dest = !src
|
||||
args.no_hints = args.hints not in truthy # dest = !src
|
||||
|
||||
# Spoiler defaults to FALSE
|
||||
# Don't do: No
|
||||
|
||||
Reference in New Issue
Block a user