Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/mars_patcher/mf/door_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,18 @@ def factory() -> dict:
for door in range(256):
door_addr = area_addr + door * 0xC
door_properties = rom.read_8(door_addr)
door_type = DoorType(door_properties & 0xF)

# Check if at end of list
if door_properties == 0:
break

# Skip doors that mage marks as deleted
# Skip doors that mage or asm marks as deleted
room = rom.read_8(door_addr + 1)
if room == 0xFF:
continue

door_type = DoorType(door_properties & 0xF)

# Skip excluded doors and doors that aren't lockable/open hatches
lock = door_locks.get((area, door))
if (area, door) in EXCLUDED_DOORS or door_type not in [
Expand Down
Loading