diff --git a/Gui.py b/Gui.py index 34709efd..40567cbb 100755 --- a/Gui.py +++ b/Gui.py @@ -318,24 +318,18 @@ def guiMain(args=None): doorShuffleLabel.pack(side=LEFT) heartbeepFrame = Frame(drowDownFrame) - heartbeepVar = StringVar() - heartbeepVar.set('normal') heartbeepOptionMenu = OptionMenu(heartbeepFrame, heartbeepVar, 'double', 'normal', 'half', 'quarter', 'off') heartbeepOptionMenu.pack(side=RIGHT) heartbeepLabel = Label(heartbeepFrame, text='Heartbeep sound rate') heartbeepLabel.pack(side=LEFT) heartcolorFrame = Frame(drowDownFrame) - heartcolorVar = StringVar() - heartcolorVar.set('red') heartcolorOptionMenu = OptionMenu(heartcolorFrame, heartcolorVar, 'red', 'blue', 'green', 'yellow', 'random') heartcolorOptionMenu.pack(side=RIGHT) heartcolorLabel = Label(heartcolorFrame, text='Heart color') heartcolorLabel.pack(side=LEFT) fastMenuFrame = Frame(drowDownFrame) - fastMenuVar = StringVar() - fastMenuVar.set('normal') fastMenuOptionMenu = OptionMenu(fastMenuFrame, fastMenuVar, 'normal', 'instant', 'double', 'triple', 'quadruple', 'half') fastMenuOptionMenu.pack(side=RIGHT) fastMenuLabel = Label(fastMenuFrame, text='Menu speed') diff --git a/Main.py b/Main.py index daabef6c..c97d99af 100644 --- a/Main.py +++ b/Main.py @@ -215,17 +215,18 @@ def main(args, seed=None): "-nohints" if not world.hints[player] else "")) if not args.outputname else '' rom.write_to_file(output_path(f'{outfilebase}{outfilepname}{outfilesuffix}.sfc')) - multidata = zlib.compress(json.dumps({"names": parsed_names, - "roms": rom_names, - "remote_items": [player for player in range(1, world.players + 1) if world.remote_items[player]], - "locations": [((location.address, location.player), (location.item.code, location.item.player)) - for location in world.get_filled_locations() if type(location.address) is int] - }).encode("utf-8")) - if args.jsonout: - jsonout["multidata"] = list(multidata) - else: - with open(output_path('%s_multidata' % outfilebase), 'wb') as f: - f.write(multidata) + if world.players > 1: + multidata = zlib.compress(json.dumps({"names": parsed_names, + "roms": rom_names, + "remote_items": [player for player in range(1, world.players + 1) if world.remote_items[player]], + "locations": [((location.address, location.player), (location.item.code, location.item.player)) + for location in world.get_filled_locations() if type(location.address) is int] + }).encode("utf-8")) + if args.jsonout: + jsonout["multidata"] = list(multidata) + else: + with open(output_path('%s_multidata' % outfilebase), 'wb') as f: + f.write(multidata) if args.create_spoiler and not args.jsonout: world.spoiler.to_file(output_path('%s_Spoiler.txt' % outfilebase))