Remove hidden alias registration from combat commands

This commit is contained in:
Jared Miller 2026-02-08 13:36:45 -05:00
parent c385f559a3
commit 64b6308bc6
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C

View file

@ -203,7 +203,7 @@ def register_combat_commands(content_dir: Path) -> None:
CommandDefinition( CommandDefinition(
name=move.name, name=move.name,
handler=_make_direct_handler(move, handler_fn), handler=_make_direct_handler(move, handler_fn),
aliases=move.aliases, aliases=[],
mode=mode, mode=mode,
help=f"{action} with {move.name}", help=f"{action} with {move.name}",
) )
@ -216,11 +216,6 @@ def register_combat_commands(content_dir: Path) -> None:
handler_fn = do_attack if first_variant.move_type == "attack" else do_defend handler_fn = do_attack if first_variant.move_type == "attack" else do_defend
mode = "*" mode = "*"
# Collect all variant aliases for the base command
all_aliases = []
for move in variants.values():
all_aliases.extend(move.aliases)
# Register base command with variant handler (e.g. "punch") # Register base command with variant handler (e.g. "punch")
action = "Attack" if first_variant.move_type == "attack" else "Defend" action = "Attack" if first_variant.move_type == "attack" else "Defend"
register( register(
@ -232,18 +227,3 @@ def register_combat_commands(content_dir: Path) -> None:
help=f"{action} with {base_name}", help=f"{action} with {base_name}",
) )
) )
# Register each variant's aliases as direct commands (e.g. "pl" → punch left)
for move in variants.values():
for alias in move.aliases:
action = "Attack" if move.move_type == "attack" else "Defend"
register(
CommandDefinition(
name=alias,
handler=_make_direct_handler(move, handler_fn),
aliases=[],
mode=mode,
help=f"{action} with {move.name}",
hidden=True,
)
)