From d3baca9251dfbc07f76cacd841595ae4482377ec Mon Sep 17 00:00:00 2001 From: t3hf1gm3nt <59876300+t3hf1gm3nt@users.noreply.github.com> Date: Fri, 14 Apr 2023 23:40:48 -0400 Subject: [PATCH] [TLOZ] Add FileNotFoundError handling for base rom (#1708) --- worlds/tloz/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/worlds/tloz/__init__.py b/worlds/tloz/__init__.py index 311215c1..356f9e5f 100644 --- a/worlds/tloz/__init__.py +++ b/worlds/tloz/__init__.py @@ -77,6 +77,12 @@ class TLoZWorld(World): self.levels = None self.filler_items = None + @classmethod + def stage_assert_generate(cls, multiworld: MultiWorld): + rom_file = get_base_rom_path() + if not os.path.exists(rom_file): + raise FileNotFoundError(rom_file) + def create_item(self, name: str): return TLoZItem(name, item_table[name].classification, self.item_name_to_id[name], self.player)