From 5d68dc568f8470547eef5d5539446d3399699317 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Wed, 15 Sep 2021 01:02:06 +0200 Subject: [PATCH] Fill: fix non_local_items breaking in single player --- Main.py | 3 +++ worlds/alttp/Rom.py | 2 +- worlds/alttp/__init__.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Main.py b/Main.py index 279d3f1e..d2ddde92 100644 --- a/Main.py +++ b/Main.py @@ -141,6 +141,9 @@ def main(args, seed=None): if world.players > 1: for player in world.player_ids: locality_rules(world, player) + else: + world.non_local_items[1] = set() + world.local_items[1] = set() AutoWorld.call_all(world, "set_rules") diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index de7678b2..a42712e4 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -108,7 +108,7 @@ class LocalRom(object): self.encrypt_range(0x180140, 32, key) self.encrypt_range(0xEDA1, 8, key) - def write_to_file(self, file, hide_enemizer=False): + def write_to_file(self, file): with open(file, 'wb') as outfile: outfile.write(self.buffer) diff --git a/worlds/alttp/__init__.py b/worlds/alttp/__init__.py index 45917640..27e0e19d 100644 --- a/worlds/alttp/__init__.py +++ b/worlds/alttp/__init__.py @@ -298,7 +298,7 @@ class ALTTPWorld(World): if world.player_name[player] != 'Player%d' % player else '' rompath = os.path.join(output_directory, f'AP_{world.seed_name}{outfilepname}.sfc') - rom.write_to_file(rompath, hide_enemizer=True) + rom.write_to_file(rompath) Patch.create_patch_file(rompath, player=player, player_name=world.player_name[player]) os.unlink(rompath) self.rom_name = rom.name