diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-12 20:22:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-12 19:22:05 -0600 |
| commit | 5d248f259a83909a714cc27a95bd7323000c6dc8 (patch) | |
| tree | e6607eaa361669c5e031f087828f38ab3a0542cb | |
| parent | e98e706598c8831381c222d18f8b75e699eabc08 (diff) | |
| download | lingo-apworld-5d248f259a83909a714cc27a95bd7323000c6dc8.tar.gz lingo-apworld-5d248f259a83909a714cc27a95bd7323000c6dc8.tar.bz2 lingo-apworld-5d248f259a83909a714cc27a95bd7323000c6dc8.zip | |
Lingo: Made entrance names unique (#2454)
| -rw-r--r-- | regions.py | 15 |
1 files changed, 11 insertions, 4 deletions
| diff --git a/regions.py b/regions.py index c75cf49..e5f947d 100644 --- a/regions.py +++ b/regions.py | |||
| @@ -43,7 +43,7 @@ def connect_painting(regions: Dict[str, Region], warp_enter: str, warp_exit: str | |||
| 43 | source_region = regions[source_painting.room] | 43 | source_region = regions[source_painting.room] |
| 44 | source_region.connect( | 44 | source_region.connect( |
| 45 | target_region, | 45 | target_region, |
| 46 | f"{source_painting.room} to {target_painting.room} (Painting)", | 46 | f"{source_painting.room} to {target_painting.room} ({source_painting.id} Painting)", |
| 47 | lambda state: lingo_can_use_entrance(state, target_painting.room, source_painting.required_door, world.player, | 47 | lambda state: lingo_can_use_entrance(state, target_painting.room, source_painting.required_door, world.player, |
| 48 | player_logic)) | 48 | player_logic)) |
| 49 | 49 | ||
| @@ -67,10 +67,17 @@ def create_regions(world: "LingoWorld", player_logic: LingoPlayerLogic) -> None: | |||
| 67 | if entrance.painting and painting_shuffle: | 67 | if entrance.painting and painting_shuffle: |
| 68 | continue | 68 | continue |
| 69 | 69 | ||
| 70 | entrance_name = f"{entrance.room} to {room.name}" | ||
| 71 | if entrance.door is not None: | ||
| 72 | if entrance.door.room is not None: | ||
| 73 | entrance_name += f" (through {entrance.door.room} - {entrance.door.door})" | ||
| 74 | else: | ||
| 75 | entrance_name += f" (through {room.name} - {entrance.door.door})" | ||
| 76 | |||
| 70 | regions[entrance.room].connect( | 77 | regions[entrance.room].connect( |
| 71 | regions[room.name], | 78 | regions[room.name], entrance_name, |
| 72 | f"{entrance.room} to {room.name}", | 79 | lambda state, r=room, e=entrance: lingo_can_use_entrance(state, r.name, e.door, world.player, |
| 73 | lambda state, r=room, e=entrance: lingo_can_use_entrance(state, r.name, e.door, world.player, player_logic)) | 80 | player_logic)) |
| 74 | 81 | ||
| 75 | handle_pilgrim_room(regions, world, player_logic) | 82 | handle_pilgrim_room(regions, world, player_logic) |
| 76 | 83 | ||
