Hide variant aliases from commands listing
This commit is contained in:
parent
d0c33911f3
commit
9e5003e52c
3 changed files with 3 additions and 1 deletions
|
|
@ -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,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue