Skip to content

Commit

Permalink
Changes pot_completed_list to a instance variable instead of global.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GodlFire committed Apr 2, 2024
1 parent 3abd9ce commit fe6c9b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions worlds/shivers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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:
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit fe6c9b9

Please sign in to comment.