Remove hidden alias registration from combat commands
This commit is contained in:
parent
c385f559a3
commit
64b6308bc6
1 changed files with 1 additions and 21 deletions
|
|
@ -203,7 +203,7 @@ def register_combat_commands(content_dir: Path) -> None:
|
|||
CommandDefinition(
|
||||
name=move.name,
|
||||
handler=_make_direct_handler(move, handler_fn),
|
||||
aliases=move.aliases,
|
||||
aliases=[],
|
||||
mode=mode,
|
||||
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
|
||||
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")
|
||||
action = "Attack" if first_variant.move_type == "attack" else "Defend"
|
||||
register(
|
||||
|
|
@ -232,18 +227,3 @@ def register_combat_commands(content_dir: Path) -> None:
|
|||
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,
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue