Update rom writer to use normal key item codes in original dungeons

This commit is contained in:
Kevin Cathcart 2017-10-15 16:04:58 -04:00
parent 2e9814882e
commit a244b92665
1 changed files with 6 additions and 1 deletions

7
Rom.py
View File

@ -83,7 +83,12 @@ def patch_rom(world, rom, hashtable, beep='normal', sprite=None):
locationaddress = location.address locationaddress = location.address
if not location.crystal: 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) rom.write_byte(locationaddress, itemid)
else: else:
# crystals # crystals