From d4498948f226245ce08e8bc643f605b2b2b2e0ea Mon Sep 17 00:00:00 2001 From: Aaron Wagener Date: Mon, 30 Oct 2023 15:14:14 -0500 Subject: [PATCH] Core: return the created entrance when connecting regions (#2406) --- BaseClasses.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BaseClasses.py b/BaseClasses.py index 973a8d50..af1f2180 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -920,7 +920,7 @@ class Region: self.locations.append(location_type(self.player, location, address, self)) def connect(self, connecting_region: Region, name: Optional[str] = None, - rule: Optional[Callable[[CollectionState], bool]] = None) -> None: + rule: Optional[Callable[[CollectionState], bool]] = None) -> entrance_type: """ Connects this Region to another Region, placing the provided rule on the connection. @@ -931,6 +931,7 @@ class Region: if rule: exit_.access_rule = rule exit_.connect(connecting_region) + return exit_ def create_exit(self, name: str) -> Entrance: """