From a244b926654aa1b4e15592bb1f38b9385f51818a Mon Sep 17 00:00:00 2001 From: Kevin Cathcart Date: Sun, 15 Oct 2017 16:04:58 -0400 Subject: [PATCH] Update rom writer to use normal key item codes in original dungeons --- Rom.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Rom.py b/Rom.py index 2dfc685d..274a8ade 100644 --- a/Rom.py +++ b/Rom.py @@ -83,7 +83,12 @@ def patch_rom(world, rom, hashtable, beep='normal', sprite=None): locationaddress = location.address if not location.crystal: - # regular items + #Keys in their native dungeon should use the orignal item code for keys + if location.parent_region.dungeon: + dungeon=location.parent_region.dungeon + if location.item.key and dungeon.is_dungeon_item(location.item): + if location.item.type == "BigKey": itemid = 0x32 + if location.item.type == "SmallKey": itemid = 0x24 rom.write_byte(locationaddress, itemid) else: # crystals