Remove alias display from command and skill listings
This commit is contained in:
parent
6e9a89f21e
commit
7c21310dcd
1 changed files with 2 additions and 16 deletions
|
|
@ -213,16 +213,9 @@ async def cmd_commands(player: Player, args: str) -> None:
|
||||||
else:
|
else:
|
||||||
other.append(defn)
|
other.append(defn)
|
||||||
|
|
||||||
def format_command(defn: CommandDefinition) -> str:
|
|
||||||
"""Format a command with its aliases in parens."""
|
|
||||||
if defn.aliases:
|
|
||||||
aliases_str = ", ".join(defn.aliases)
|
|
||||||
return f"{defn.name}({aliases_str})"
|
|
||||||
return defn.name
|
|
||||||
|
|
||||||
all_commands = movement + other
|
all_commands = movement + other
|
||||||
all_commands.sort(key=lambda d: d.name)
|
all_commands.sort(key=lambda d: d.name)
|
||||||
names = [format_command(d) for d in all_commands]
|
names = [d.name for d in all_commands]
|
||||||
|
|
||||||
await player.send(" ".join(names) + "\r\n")
|
await player.send(" ".join(names) + "\r\n")
|
||||||
|
|
||||||
|
|
@ -262,16 +255,9 @@ async def cmd_skills(player: Player, args: str) -> None:
|
||||||
elif defn.help.startswith("Defend with"):
|
elif defn.help.startswith("Defend with"):
|
||||||
defenses.append(defn)
|
defenses.append(defn)
|
||||||
|
|
||||||
def format_command(defn: CommandDefinition) -> str:
|
|
||||||
"""Format a command with its aliases in parens."""
|
|
||||||
if defn.aliases:
|
|
||||||
aliases_str = ", ".join(defn.aliases)
|
|
||||||
return f"{defn.name}({aliases_str})"
|
|
||||||
return defn.name
|
|
||||||
|
|
||||||
all_skills = attacks + defenses
|
all_skills = attacks + defenses
|
||||||
all_skills.sort(key=lambda d: d.name)
|
all_skills.sort(key=lambda d: d.name)
|
||||||
names = [format_command(d) for d in all_skills]
|
names = [d.name for d in all_skills]
|
||||||
|
|
||||||
await player.send(" ".join(names) + "\r\n")
|
await player.send(" ".join(names) + "\r\n")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue