X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Fmenu.py;h=b3851986e61bf83db8a24373e9bb46ce4775c15a;hp=1bdccb02fe27c566a23104ba93deeaf9ddc57b64;hb=9dc3f8de8d178b629852c6a6cdbbfc81214e09b8;hpb=1e22e0aca6b5804bfcde8eccaafabd46aab8a146 diff --git a/mudpy/menu.py b/mudpy/menu.py index 1bdccb0..b385198 100644 --- a/mudpy/menu.py +++ b/mudpy/menu.py @@ -19,3 +19,18 @@ def activate_avatar_create(user): """List available avatars as choices for the activate_avatar state.""" return dict( [(str(x + 1), y) for x, y in enumerate(user.list_avatar_names())]) + + +def checking_new_account_name_action_d(user): + """Destroy the new account because the user asked to disconnect.""" + return user.account.destroy() + + +def checking_new_account_name_action_g(user): + """Destroy the new account, the user asked to go back to name entry.""" + return user.account.destroy() + + +def choose_gender_action(user): + """Set the avatar's gender to the selected value.""" + return user.avatar.set("gender", user.menu_choices[user.choice])