# modify, and distribute this software is granted under terms
# provided in the LICENSE file distributed with this software.
+import mudpy
+
def activate_avatar_action(user):
"""Activate the selected avatar in the activate_avatar state."""
def choose_gender_action(user):
"""Set the avatar's gender to the selected value."""
return user.avatar.set("gender", user.menu_choices[user.choice])
+
+
+def choose_name_action(user):
+ """Set the avatar's name to the selected value."""
+ return user.avatar.set("name", user.menu_choices[user.choice])
+
+
+def choose_name_create_1(user):
+ """Provide a randomly-generated name as choice 1."""
+ return mudpy.misc.random_name()
+
+
+def choose_name_create_2(user):
+ """Provide a randomly-generated name as choice 2."""
+ return mudpy.misc.random_name()
+
+
+def choose_name_create_3(user):
+ """Provide a randomly-generated name as choice 3."""
+ return mudpy.misc.random_name()
+
+
+def choose_name_create_4(user):
+ """Provide a randomly-generated name as choice 4."""
+ return mudpy.misc.random_name()
+
+
+def choose_name_create_5(user):
+ """Provide a randomly-generated name as choice 5."""
+ return mudpy.misc.random_name()
+
+
+def choose_name_create_6(user):
+ """Provide a randomly-generated name as choice 6."""
+ return mudpy.misc.random_name()
+
+
+def choose_name_create_7(user):
+ """Provide a randomly-generated name as choice 7."""
+ return mudpy.misc.random_name()
Avatars are one of male or female at birth.
menu.choose_gender.prompt: "Pick a birth gender for your new avatar:"
-menu.choose_name.action: user.avatar.set("name",
- user.menu_choices[user.choice])
+menu.choose_name.action: mudpy.menu.choose_name_action(user)
menu.choose_name.branch: main_utility
menu.choose_name.branch_g: choose_name
menu.choose_name.choice_g: generate more names
-menu.choose_name.create_1: random_name()
-menu.choose_name.create_2: random_name()
-menu.choose_name.create_3: random_name()
-menu.choose_name.create_4: random_name()
-menu.choose_name.create_5: random_name()
-menu.choose_name.create_6: random_name()
-menu.choose_name.create_7: random_name()
+menu.choose_name.create_1: mudpy.menu.choose_name_create_1(user)
+menu.choose_name.create_2: mudpy.menu.choose_name_create_2(user)
+menu.choose_name.create_3: mudpy.menu.choose_name_create_3(user)
+menu.choose_name.create_4: mudpy.menu.choose_name_create_4(user)
+menu.choose_name.create_5: mudpy.menu.choose_name_create_5(user)
+menu.choose_name.create_6: mudpy.menu.choose_name_create_6(user)
+menu.choose_name.create_7: mudpy.menu.choose_name_create_7(user)
menu.choose_name.default: g
menu.choose_name.description: Your new avatar needs a name. This will be the
name with which $(tpsp) grew up, and will initially be the name by which