diff options
| -rwxr-xr-x | gpt_adventure.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gpt_adventure.py b/gpt_adventure.py index c151cdc..68f8f58 100755 --- a/gpt_adventure.py +++ b/gpt_adventure.py @@ -73,6 +73,7 @@ def pick_flavor() -> str: for i, (scenario, script) in enumerate(flavors.items()): print(f"{i}.\t{scenario}") choices.append(script) + print(f"{len(choices)}.\tcustom") while True: choice = input("Choose a scenario: ") try: @@ -80,6 +81,9 @@ def pick_flavor() -> str: except ValueError: print("Input must be an integer.") continue + if choice_int == len(choices): + print("Enter a custom prompt. Press control-D when you're done.") + return sys.stdin.read().strip() try: return choices[choice_int] except IndexError: |
