Skip to content

Commit

Permalink
Lingo: Made entrance names unique (ArchipelagoMW#2454)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatkirby authored and FlySniper committed Nov 14, 2023
1 parent 7001457 commit 1b7336c
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions worlds/lingo/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def connect_painting(regions: Dict[str, Region], warp_enter: str, warp_exit: str
source_region = regions[source_painting.room]
source_region.connect(
target_region,
f"{source_painting.room} to {target_painting.room} (Painting)",
f"{source_painting.room} to {target_painting.room} ({source_painting.id} Painting)",
lambda state: lingo_can_use_entrance(state, target_painting.room, source_painting.required_door, world.player,
player_logic))

Expand All @@ -67,10 +67,17 @@ def create_regions(world: "LingoWorld", player_logic: LingoPlayerLogic) -> None:
if entrance.painting and painting_shuffle:
continue

entrance_name = f"{entrance.room} to {room.name}"
if entrance.door is not None:
if entrance.door.room is not None:
entrance_name += f" (through {entrance.door.room} - {entrance.door.door})"
else:
entrance_name += f" (through {room.name} - {entrance.door.door})"

regions[entrance.room].connect(
regions[room.name],
f"{entrance.room} to {room.name}",
lambda state, r=room, e=entrance: lingo_can_use_entrance(state, r.name, e.door, world.player, player_logic))
regions[room.name], entrance_name,
lambda state, r=room, e=entrance: lingo_can_use_entrance(state, r.name, e.door, world.player,
player_logic))

handle_pilgrim_room(regions, world, player_logic)

Expand Down

0 comments on commit 1b7336c

Please sign in to comment.