diff options
Diffstat (limited to 'regions.py')
| -rw-r--r-- | regions.py | 15 |
1 files changed, 4 insertions, 11 deletions
| diff --git a/regions.py b/regions.py index c24144a..bdc42f4 100644 --- a/regions.py +++ b/regions.py | |||
| @@ -4,7 +4,7 @@ from BaseClasses import Entrance, ItemClassification, Region | |||
| 4 | from .items import LingoItem | 4 | from .items import LingoItem |
| 5 | from .locations import LingoLocation | 5 | from .locations import LingoLocation |
| 6 | from .player_logic import LingoPlayerLogic | 6 | from .player_logic import LingoPlayerLogic |
| 7 | from .rules import lingo_can_use_entrance, lingo_can_use_pilgrimage, make_location_lambda | 7 | from .rules import lingo_can_use_entrance, make_location_lambda |
| 8 | from .static_logic import ALL_ROOMS, PAINTINGS, Room, RoomAndDoor | 8 | from .static_logic import ALL_ROOMS, PAINTINGS, Room, RoomAndDoor |
| 9 | 9 | ||
| 10 | if TYPE_CHECKING: | 10 | if TYPE_CHECKING: |
| @@ -25,15 +25,6 @@ def create_region(room: Room, world: "LingoWorld", player_logic: LingoPlayerLogi | |||
| 25 | return new_region | 25 | return new_region |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | def handle_pilgrim_room(regions: Dict[str, Region], world: "LingoWorld", player_logic: LingoPlayerLogic) -> None: | ||
| 29 | target_region = regions["Pilgrim Antechamber"] | ||
| 30 | source_region = regions["Outside The Agreeable"] | ||
| 31 | source_region.connect( | ||
| 32 | target_region, | ||
| 33 | "Pilgrimage", | ||
| 34 | lambda state: lingo_can_use_pilgrimage(state, world, player_logic)) | ||
| 35 | |||
| 36 | |||
| 37 | def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str, | 28 | def connect_entrance(regions: Dict[str, Region], source_region: Region, target_region: Region, description: str, |
| 38 | door: Optional[RoomAndDoor], world: "LingoWorld", player_logic: LingoPlayerLogic): | 29 | door: Optional[RoomAndDoor], world: "LingoWorld", player_logic: LingoPlayerLogic): |
| 39 | connection = Entrance(world.player, description, source_region) | 30 | connection = Entrance(world.player, description, source_region) |
| @@ -91,7 +82,9 @@ def create_regions(world: "LingoWorld", player_logic: LingoPlayerLogic) -> None: | |||
| 91 | connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world, | 82 | connect_entrance(regions, regions[entrance.room], regions[room.name], entrance_name, entrance.door, world, |
| 92 | player_logic) | 83 | player_logic) |
| 93 | 84 | ||
| 94 | handle_pilgrim_room(regions, world, player_logic) | 85 | # Add the fake pilgrimage. |
| 86 | connect_entrance(regions, regions["Outside The Agreeable"], regions["Pilgrim Antechamber"], "Pilgrimage", | ||
| 87 | RoomAndDoor("Pilgrim Antechamber", "Pilgrimage"), world, player_logic) | ||
| 95 | 88 | ||
| 96 | if early_color_hallways: | 89 | if early_color_hallways: |
| 97 | regions["Starting Room"].connect(regions["Outside The Undeterred"], "Early Color Hallways") | 90 | regions["Starting Room"].connect(regions["Outside The Undeterred"], "Early Color Hallways") |
