Skip to content

Commit

Permalink
update to skip Start locations that don't actually get created
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint committed Oct 27, 2024
1 parent 07de8f0 commit e88455f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion worlds/hk/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,13 @@
for option_name, option_data in pool_options.items():
extra_data = {"__module__": __name__, "items": option_data[0], "locations": option_data[1]}
if option_name in option_docstrings:
if option_name == "RandomizeFocus":
# pool options for focus are just lying
count = 1
else:
count = len([loc for loc in option_data[1] if loc != "Start"])
extra_data["__doc__"] = option_docstrings[option_name] + \
f"\n This option adds {len(option_data[0])} location(s)"
f"\n This option adds {count} location{'s' if count != 1 else ''}."
if option_name in default_on:
option = type(option_name, (DefaultOnToggle,), extra_data)
else:
Expand Down

0 comments on commit e88455f

Please sign in to comment.