Restore native dungeon item behavior for glitched modes. baserom handles dungeon IDs

This commit is contained in:
Kris Davie
2025-01-12 22:20:54 +01:00
committed by aerinon
parent 6268a7e503
commit 5664526e0c
2 changed files with 6 additions and 4 deletions

6
Rom.py
View File

@@ -434,7 +434,9 @@ def patch_rom(world, rom, player, team, is_mystery=False):
if location.item.name in valid_pot_items and location.item.player == player:
location.pot.item = valid_pot_items[location.item.name]
else:
code = handle_native_dungeon(location, itemid)
code = itemid
if world.pottery[player] == 'none' or location.locked:
code = handle_native_dungeon(location, itemid)
standing_item_flag = 0x80
if location.item.player != player:
standing_item_flag |= 0x40
@@ -452,8 +454,6 @@ def patch_rom(world, rom, player, team, is_mystery=False):
if not location.crystal:
if location.item is not None:
# Keys in their native dungeon should use the original item code for keys
itemid = handle_native_dungeon(location, itemid)
if world.remote_items[player]:
itemid = list(location_table.keys()).index(location.name) + 1
assert itemid < 0x100