auto name gen

This commit is contained in:
2026-06-24 16:52:55 -04:00
parent 54b0c5cb8c
commit 144625cb5b
7 changed files with 14595 additions and 10 deletions

View File

@@ -3,8 +3,8 @@ from untitled import generation, model, rules, ui
def adoption():
print("Welcome to the shelter!")
while True:
auto_name = ""
choice = "Reroll"
while choice == "Reroll":
choices = generation.generate_cat_choices()
@@ -14,11 +14,19 @@ def adoption():
)
while True:
name = ui.text("Please choose a name for your cat:")
error = rules.validate_cat_name(name)
if not error:
break
print(error)
name = ui.text(
'Please choose a name for your cat or type "idk" to autofill a generated one:',
auto_name,
)
if name.lower() != "idk":
auto_name = ""
error = rules.validate_cat_name(name)
if not error:
break
print(error)
else:
auto_name = generation.generate_name()
if ui.confirm(
f"Do you want to adopt {name}, {generation.generate_trait_sentence(choice).lower()}?"
):