fix interactive selection
This commit is contained in:
parent
342b07e6ea
commit
efc3a07ee2
1 changed files with 5 additions and 9 deletions
10
main.py
10
main.py
|
@ -23,7 +23,6 @@ if __name__ == "__main__":
|
|||
# Interactive selection
|
||||
if (c_id == []):
|
||||
# Cheat list
|
||||
print("Enter 0 to exit.")
|
||||
print("You can run multiples cheat at once, separate your choices with a space.")
|
||||
print("Available cheats:")
|
||||
for idx, cheat in enumerate(c.cheats_list):
|
||||
|
@ -33,17 +32,14 @@ if __name__ == "__main__":
|
|||
try:
|
||||
response = [int(i) for i in input("Enter ID: ").split(" ")]
|
||||
for i in response:
|
||||
match i:
|
||||
case 0:
|
||||
exit(0)
|
||||
case j if j > len(c.cheats_list):
|
||||
if (i > len(c.cheats_list) or i <= 0):
|
||||
raise IndexError
|
||||
case _:
|
||||
c_id.append(i - 1)
|
||||
except KeyboardInterrupt:
|
||||
print("??\nBye.")
|
||||
print("Bye")
|
||||
exit(1)
|
||||
except:
|
||||
c_id = []
|
||||
print("Invalid ID.")
|
||||
|
||||
# Instanciate and run threads
|
||||
|
|
Reference in a new issue