Hide variant aliases from commands listing

This commit is contained in:
Jared Miller 2026-02-08 13:04:54 -05:00
parent d0c33911f3
commit 9e5003e52c
Signed by: shmup
GPG key ID: 22B5C6D66A38B06C
3 changed files with 3 additions and 1 deletions

View file

@ -244,5 +244,6 @@ def register_combat_commands(content_dir: Path) -> None:
aliases=[], aliases=[],
mode=mode, mode=mode,
help=f"{action} with {move.name}", help=f"{action} with {move.name}",
hidden=True,
) )
) )

View file

@ -18,6 +18,7 @@ class CommandDefinition:
aliases: list[str] = field(default_factory=list) aliases: list[str] = field(default_factory=list)
mode: str = "normal" mode: str = "normal"
help: str = "" help: str = ""
hidden: bool = False
# Registry maps command names to definitions # Registry maps command names to definitions

View file

@ -171,7 +171,7 @@ async def cmd_commands(player: Player, args: str) -> None:
for defn in _registry.values(): for defn in _registry.values():
defn_id = id(defn) defn_id = id(defn)
if defn_id not in seen: if defn_id not in seen and not defn.hidden:
seen.add(defn_id) seen.add(defn_id)
unique_commands.append(defn) unique_commands.append(defn)