Reenable Chest Size Matches Contents

This commit is contained in:
espeon65536
2021-09-10 10:31:05 -05:00
committed by Fabian Dill
parent 9c09d84c71
commit cace88e8fa
4 changed files with 28 additions and 12 deletions

View File

@@ -1624,10 +1624,15 @@ def patch_rom(world, rom):
chest_name = 'Spirit Temple Compass Chest'
chest_address = 0x2B6B07C
location = world.get_location(chest_name)
item = read_rom_item(rom, location.item.index)
if item['chest_type'] in (1, 3):
rom.write_int16(chest_address + 2, 0x0190) # X pos
rom.write_int16(chest_address + 6, 0xFABC) # Z pos
if location.item.game == 'Ocarina of Time':
item = read_rom_item(rom, location.item.index)
if item['chest_type'] in (1, 3):
rom.write_int16(chest_address + 2, 0x0190) # X pos
rom.write_int16(chest_address + 6, 0xFABC) # Z pos
else:
if location.item.advancement:
rom.write_int16(chest_address + 2, 0x0190) # X pos
rom.write_int16(chest_address + 6, 0xFABC) # Z pos
# Move Silver Gauntlets chest if it is small so it is reachable from Spirit Hover Seam
if world.logic_rules != 'glitchless':
@@ -1635,10 +1640,15 @@ def patch_rom(world, rom):
chest_address_0 = 0x21A02D0 # Address in setup 0
chest_address_2 = 0x21A06E4 # Address in setup 2
location = world.get_location(chest_name)
item = read_rom_item(rom, location.item.index)
if item['chest_type'] in (1, 3):
rom.write_int16(chest_address_0 + 6, 0x0172) # Z pos
rom.write_int16(chest_address_2 + 6, 0x0172) # Z pos
if location.item.game == 'Ocarina of Time':
item = read_rom_item(rom, location.item.index)
if item['chest_type'] in (1, 3):
rom.write_int16(chest_address_0 + 6, 0x0172) # Z pos
rom.write_int16(chest_address_2 + 6, 0x0172) # Z pos
else:
if location.item.advancement:
rom.write_int16(chest_address_0 + 6, 0x0172) # Z pos
rom.write_int16(chest_address_2 + 6, 0x0172) # Z pos
# give dungeon items the correct messages
add_item_messages(messages, shop_items, world)