From b42e4db472d2187da2e8757c5087e95369fdb333 Mon Sep 17 00:00:00 2001 From: StructuralMike <66819228+StructuralMike@users.noreply.github.com> Date: Tue, 13 Apr 2021 16:58:08 +0200 Subject: [PATCH] potential retro-fix --- Rom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Rom.py b/Rom.py index 392efbb7..b4cb3da5 100644 --- a/Rom.py +++ b/Rom.py @@ -1571,8 +1571,9 @@ def write_custom_shops(rom, world, player): break if world.shopsanity[player] or shop.type == ShopType.TakeAny: rom.write_byte(0x186560 + shop.sram_address + index, 1) - loc_item = world.get_location(shop_to_location_table[shop.region.name][index], player).item - if not loc_item: + if world.shopsanity[player] and shop.region.name in shop_to_location_table: + loc_item = world.get_location(shop_to_location_table[shop.region.name][index], player).item + else: loc_item = ItemFactory(item['item'], player) item_id = loc_item.code price = int16_as_bytes(item['price'])