From 39a592152251aaea75b6aef8329d0ce2624fc133 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 23 Jul 2021 20:04:51 +0200 Subject: [PATCH] round of post-test fixes --- Generate.py | 2 +- LttPClient.py | 2 +- Main.py | 2 +- factorio_inno_setup_38.iss | 2 +- inno_setup_38.iss | 2 +- inno_setup_39.iss | 2 +- worlds/alttp/Rom.py | 8 ++++---- worlds/subnautica/Items.py | 3 ++- worlds/subnautica/Locations.py | 3 ++- 9 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Generate.py b/Generate.py index 39f55d67..9f34bb81 100644 --- a/Generate.py +++ b/Generate.py @@ -125,7 +125,7 @@ def main(args=None, callback=ERmain): erargs.create_spoiler = args.spoiler > 0 erargs.glitch_triforce = options["generator"]["glitch_triforce_room"] erargs.race = args.race - erargs.skip_playthrough = args.spoiler == 0 + erargs.skip_playthrough = args.spoiler < 2 erargs.outputname = seed_name erargs.outputpath = args.outputpath erargs.teams = args.teams diff --git a/LttPClient.py b/LttPClient.py index 44e3ef23..bb89d838 100644 --- a/LttPClient.py +++ b/LttPClient.py @@ -874,7 +874,7 @@ async def main(): logging.exception(e) asyncio.create_task(run_game(adjustedromfile if adjusted else romfile)) - ctx = Context(args.snes, args.connect, args.password, args.founditems) + ctx = Context(args.snes, args.connect, args.password) input_task = asyncio.create_task(console_loop(ctx), name="Input") if ctx.server_task is None: diff --git a/Main.py b/Main.py index fcd401af..89c1d839 100644 --- a/Main.py +++ b/Main.py @@ -262,7 +262,7 @@ def main(args, seed=None): patch_rom(world, rom, player, team, use_enemizer) if use_enemizer: - patch_enemizer(world, team, player, rom, args.enemizercli) + patch_enemizer(world, team, player, rom, args.enemizercli, output_directory) if args.race: patch_race_rom(rom, world, player) diff --git a/factorio_inno_setup_38.iss b/factorio_inno_setup_38.iss index 60d5ad0c..0cb1fd18 100644 --- a/factorio_inno_setup_38.iss +++ b/factorio_inno_setup_38.iss @@ -1,7 +1,7 @@ #define sourcepath "build_factorio\exe.win-amd64-3.8\" #define MyAppName "Archipelago Factorio Client" #define MyAppExeName "ArchipelagoGraphicalFactorioClient.exe" -#define MyAppIcon "icon.ico" +#define MyAppIcon "data/icon.ico" [Setup] ; NOTE: The value of AppId uniquely identifies this application. diff --git a/inno_setup_38.iss b/inno_setup_38.iss index ba2213aa..50d9de1e 100644 --- a/inno_setup_38.iss +++ b/inno_setup_38.iss @@ -1,7 +1,7 @@ #define sourcepath "build\exe.win-amd64-3.8\" #define MyAppName "Archipelago" #define MyAppExeName "ArchipelagoLttPClient.exe" -#define MyAppIcon "icon.ico" +#define MyAppIcon "data/icon.ico" [Setup] ; NOTE: The value of AppId uniquely identifies this application. diff --git a/inno_setup_39.iss b/inno_setup_39.iss index cbb14a3b..a422021b 100644 --- a/inno_setup_39.iss +++ b/inno_setup_39.iss @@ -1,7 +1,7 @@ #define sourcepath "build\exe.win-amd64-3.9\" #define MyAppName "Archipelago" #define MyAppExeName "ArchipelagoLttPClient.exe" -#define MyAppIcon "icon.ico" +#define MyAppIcon "data/icon.ico" [Setup] ; NOTE: The value of AppId uniquely identifies this application. diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index 5810e0a7..f7bdca5e 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -279,11 +279,11 @@ def apply_random_sprite_on_event(rom: LocalRom, sprite, local_random, allow_rand rom.write_bytes(0x307078 + (i * 0x8000), sprite.glove_palette) -def patch_enemizer(world, team: int, player: int, rom: LocalRom, enemizercli): +def patch_enemizer(world, team: int, player: int, rom: LocalRom, enemizercli, output_directory): check_enemizer(enemizercli) - randopatch_path = os.path.abspath(output_path(f'enemizer_randopatch_{team}_{player}.sfc')) - options_path = os.path.abspath(output_path(f'enemizer_options_{team}_{player}.json')) - enemizer_output_path = os.path.abspath(output_path(f'enemizer_output_{team}_{player}.sfc')) + randopatch_path = os.path.abspath(os.path.join(output_directory, f'enemizer_randopatch_{team}_{player}.sfc')) + options_path = os.path.abspath(os.path.join(output_directory, f'enemizer_options_{team}_{player}.json')) + enemizer_output_path = os.path.abspath(os.path.join(output_directory, f'enemizer_output_{team}_{player}.sfc')) # write options file for enemizer options = { diff --git a/worlds/subnautica/Items.py b/worlds/subnautica/Items.py index 9f3a6d05..d29ff3e3 100644 --- a/worlds/subnautica/Items.py +++ b/worlds/subnautica/Items.py @@ -1,6 +1,7 @@ import json +import os -with open('worlds/subnautica/items.json', 'r') as file: +with open(os.path.join(os.path.dirname(__file__), 'items.json'), 'r') as file: item_table = json.loads(file.read()) lookup_id_to_name = {} diff --git a/worlds/subnautica/Locations.py b/worlds/subnautica/Locations.py index 414cffc1..361a712b 100644 --- a/worlds/subnautica/Locations.py +++ b/worlds/subnautica/Locations.py @@ -1,6 +1,7 @@ import json +import os -with open('worlds/subnautica/locations.json', 'r') as file: +with open(os.path.join(os.path.dirname(__file__), 'locations.json'), 'r') as file: location_table = json.loads(file.read()) lookup_id_to_name = {}