+
+
+def activate_avatar_action(user):
+ """Activate the selected avatar in the activate_avatar state."""
+ return user.activate_avatar_by_index(int(user.choice) - 1)
+
+
+def activate_avatar_action_a(user):
+ """Abort selection by doing nothing."""
+ return True
+
+
+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())])