Core: don't allow region, location, or entrance with duplicate names (#2453)

This commit is contained in:
Aaron Wagener
2024-02-25 14:56:27 -06:00
committed by GitHub
parent 86a7ac466e
commit 8f7b0ee489
11 changed files with 36 additions and 51 deletions

View File

@@ -100,9 +100,7 @@ class MMBN3World(World):
for region_info in regions:
region = name_to_region[region_info.name]
for connection in region_info.connections:
connection_region = name_to_region[connection]
entrance = Entrance(self.player, connection, region)
entrance.connect(connection_region)
entrance = region.connect(name_to_region[connection])
# ACDC Pending with Start Randomizer
# if connection == RegionName.ACDC_Overworld:
@@ -141,7 +139,6 @@ class MMBN3World(World):
if connection == RegionName.WWW_Island:
entrance.access_rule = lambda state:\
state.has(ItemName.Progressive_Undernet_Rank, self.player, 8)
region.exits.append(entrance)
def create_items(self) -> None:
# First add in all progression and useful items