The Messenger: Fix lambda capture issue in add_closed_portal_reqs (#5816)

This commit is contained in:
Mysteryem
2026-01-18 13:42:50 +00:00
committed by GitHub
parent 5899920e48
commit b81e1a228a

View File

@@ -306,4 +306,4 @@ def add_closed_portal_reqs(world: "MessengerWorld") -> None:
closed_portals = [entrance for entrance in PORTALS if f"{entrance} Portal" not in world.starting_portals]
for portal in closed_portals:
tower_exit = world.multiworld.get_entrance(f"ToTHQ {portal} Portal", world.player)
tower_exit.access_rule = lambda state: state.has(portal, world.player)
tower_exit.access_rule = lambda state, portal_item=portal: state.has(portal_item, world.player)