diff --git a/src/mudlib/commands/prompt.py b/src/mudlib/commands/prompt.py index d5e224b..93ba3e5 100644 --- a/src/mudlib/commands/prompt.py +++ b/src/mudlib/commands/prompt.py @@ -1,7 +1,7 @@ """Prompt customization command.""" from mudlib.player import Player -from mudlib.prompt import DEFAULT_TEMPLATES +from mudlib.prompt import ADMIN_TEMPLATES, DEFAULT_TEMPLATES async def cmd_prompt(player: Player, args: str) -> None: @@ -15,9 +15,17 @@ async def cmd_prompt(player: Player, args: str) -> None: if not args: # Show current template and available variables - current = player.prompt_template or DEFAULT_TEMPLATES.get( - player.mode, "{stamina_gauge} {pl} > " - ) + if player.prompt_template: + current = player.prompt_template + elif player.paint_mode: + current = DEFAULT_TEMPLATES["paint"] + elif player.is_admin: + current = ADMIN_TEMPLATES.get( + player.mode, + DEFAULT_TEMPLATES.get(player.mode, "{stamina_gauge} {pl} > "), + ) + else: + current = DEFAULT_TEMPLATES.get(player.mode, "{stamina_gauge} {pl} > ") msg = f"Current prompt: {current}\r\n\r\n" msg += "Available variables:\r\n" msg += " stamina_pct - stamina percentage (0-100)\r\n"