From 9bbc49204d645f66fe97cb7cfd51ee4cddb10183 Mon Sep 17 00:00:00 2001 From: PoryGone <98504756+PoryGone@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:53:52 -0400 Subject: [PATCH] DKC3: Fix List Out of Range Error on Level Shuffle Hint extension (#3077) --- worlds/dkc3/Names/LocationName.py | 2 +- worlds/dkc3/__init__.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/worlds/dkc3/Names/LocationName.py b/worlds/dkc3/Names/LocationName.py index f79a25f1..dbd63623 100644 --- a/worlds/dkc3/Names/LocationName.py +++ b/worlds/dkc3/Names/LocationName.py @@ -294,7 +294,7 @@ barnacle_region = "Barnacle's Island Region" blue_region = "Blue's Beach Hut Region" blizzard_region = "Bizzard's Basecamp Region" -lake_orangatanga_region = "Lake_Orangatanga" +lake_orangatanga_region = "Lake Orangatanga" kremwood_forest_region = "Kremwood Forest" cotton_top_cove_region = "Cotton-Top Cove" mekanos_region = "Mekanos" diff --git a/worlds/dkc3/__init__.py b/worlds/dkc3/__init__.py index dfb42bd0..b0e153dc 100644 --- a/worlds/dkc3/__init__.py +++ b/worlds/dkc3/__init__.py @@ -201,7 +201,12 @@ class DKC3World(World): er_hint_data = {} for world_index in range(len(world_names)): for level_index in range(5): - level_region = self.multiworld.get_region(self.active_level_list[world_index * 5 + level_index], self.player) + level_id: int = world_index * 5 + level_index + + if level_id >= len(self.active_level_list): + break + + level_region = self.multiworld.get_region(self.active_level_list[level_id], self.player) for location in level_region.locations: er_hint_data[location.address] = world_names[world_index]