[TLOZ] Add FileNotFoundError handling for base rom ()

This commit is contained in:
t3hf1gm3nt 2023-04-14 23:40:48 -04:00 committed by GitHub
parent f52ca2571f
commit d3baca9251
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions
worlds/tloz

View File

@ -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)