Skip to content

Commit

Permalink
Fix Spoiler.build_password to match Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
fenhl committed Oct 1, 2024
1 parent 0c974f0 commit b6c013b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def make_spoiler(world_settings: list[Settings], worlds: list[World]) -> Spoiler
):
spoiler.find_misc_hint_items()
spoiler.build_file_hash()
spoiler.build_password()
spoiler.build_password(any(settings.password_lock for settings in world_settings))
return spoiler


Expand Down
4 changes: 2 additions & 2 deletions Spoiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ def build_file_hash(self) -> None:
for i in range(5):
self.file_hash.append(random.randint(0, 31) if dist_file_hash[i] is None else HASH_ICONS.index(dist_file_hash[i]))

def build_password(self) -> None:
def build_password(self, password: bool = False) -> None:
dist_password = self.settings.distribution.password
if password and None in dist_password and not self.settings.create_spoiler:
raise Exception('You must enable spoiler log or use plandomizer to define one to use the password feature.')
for i in range(6):
if self.settings.password_lock:
if password:
self.password.append(random.randint(1, 5) if dist_password[i] is None else PASSWORD_NOTES.index(dist_password[i]) + 1)
else:
self.password.append(0)
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__version__ = '8.2.13'

# This is a supplemental version number for branches based off of main dev.
supplementary_version = 1
supplementary_version = 2

# Pick a unique identifier byte for your fork if you are intending to have a long-lasting branch.
# This will be 0x00 for main releases and 0x01 for main dev.
Expand Down

0 comments on commit b6c013b

Please sign in to comment.