Core: Remove broken unused code from Options.py (#3781)
"Unused" is a baseless assertion, but this code path has been crashing on the first statement for 6 months and noone's complained
This commit is contained in:
parent
67520adcea
commit
50330cf32f
28
Options.py
28
Options.py
|
@ -1518,31 +1518,3 @@ def generate_yaml_templates(target_folder: typing.Union[str, "pathlib.Path"], ge
|
||||||
|
|
||||||
with open(os.path.join(target_folder, game_name + ".yaml"), "w", encoding="utf-8-sig") as f:
|
with open(os.path.join(target_folder, game_name + ".yaml"), "w", encoding="utf-8-sig") as f:
|
||||||
f.write(res)
|
f.write(res)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
|
|
||||||
from worlds.alttp.Options import Logic
|
|
||||||
import argparse
|
|
||||||
|
|
||||||
map_shuffle = Toggle
|
|
||||||
compass_shuffle = Toggle
|
|
||||||
key_shuffle = Toggle
|
|
||||||
big_key_shuffle = Toggle
|
|
||||||
hints = Toggle
|
|
||||||
test = argparse.Namespace()
|
|
||||||
test.logic = Logic.from_text("no_logic")
|
|
||||||
test.map_shuffle = map_shuffle.from_text("ON")
|
|
||||||
test.hints = hints.from_text('OFF')
|
|
||||||
try:
|
|
||||||
test.logic = Logic.from_text("overworld_glitches_typo")
|
|
||||||
except KeyError as e:
|
|
||||||
print(e)
|
|
||||||
try:
|
|
||||||
test.logic_owg = Logic.from_text("owg")
|
|
||||||
except KeyError as e:
|
|
||||||
print(e)
|
|
||||||
if test.map_shuffle:
|
|
||||||
print("map_shuffle is on")
|
|
||||||
print(f"Hints are {bool(test.hints)}")
|
|
||||||
print(test)
|
|
||||||
|
|
Loading…
Reference in New Issue