From dcecbb87a19c47c7d00f773f8df6bf98d65410ef Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 22 Oct 2025 19:27:09 -0400 Subject: Make icarus optional --- apworld/context.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apworld/context.py') diff --git a/apworld/context.py b/apworld/context.py index a0ee34d..d59bf9d 100644 --- a/apworld/context.py +++ b/apworld/context.py @@ -550,8 +550,11 @@ async def process_game_cmd(manager: Lingo2Manager, args: dict): elif cmd == "CheckWorldport": port_id = args["port_id"] worldports = {port_id} - if str(port_id) in manager.client_ctx.slot_data["port_pairings"]: - worldports.add(manager.client_ctx.slot_data["port_pairings"][str(port_id)]) + + # Also check the reverse port if it's a two-way connection. + port_pairings = manager.client_ctx.slot_data["port_pairings"] + if str(port_id) in port_pairings and port_pairings.get(str(port_pairings[str(port_id)]), None) == port_id: + worldports.add(port_pairings[str(port_id)]) updates = manager.update_worldports(worldports) if len(updates) > 0: -- cgit 1.4.1