From fe6c9b95edb2e0a5892cae5f06b3cda0b4c28b58 Mon Sep 17 00:00:00 2001 From: GodlFire <46984098+GodlFire@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:53:29 -0600 Subject: [PATCH] Changes pot_completed_list to a instance variable instead of global. Changes pot_completed_list to a instance variable instead of global. The global variable was unintentional and was causing missmatch in pre_fill which would cause generation error. --- worlds/shivers/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/worlds/shivers/__init__.py b/worlds/shivers/__init__.py index 4b02bdcb3974..e6b90a560f84 100644 --- a/worlds/shivers/__init__.py +++ b/worlds/shivers/__init__.py @@ -22,6 +22,10 @@ class ShiversWorld(World): Shivers is a horror themed point and click adventure. Explore the mysteries of Windlenot's Museum of the Strange and Unusual. """ + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + self.pot_completed_list = [] + game: str = "Shivers" topology_present = False web = ShiversWeb() @@ -30,7 +34,6 @@ class ShiversWorld(World): item_name_to_id = {name: data.code for name, data in item_table.items()} location_name_to_id = Constants.location_name_to_id - pot_completed_list = [] shivers_item_id_offset = 27000 def create_item(self, name: str) -> Item: @@ -189,16 +192,13 @@ def pre_fill(self) -> None: for i in range(10): #Pieces if self.pot_completed_list[i] == 0: - self.pot_completed_list.append(0) storageitems += [self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 70 + i])] storageitems += [self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 80 + i])] #Complete else: - self.pot_completed_list.append(1) storageitems += [self.create_item(self.item_id_to_name[self.shivers_item_id_offset + 140 + i])] storageitems += [self.create_item("Empty")] - storageitems += [self.create_item("Empty") for i in range(3)] state = self.multiworld.get_all_state(True)