Refactor Command usage and description strings

This commit is contained in:
AnimeGitB
2022-07-18 18:36:17 +09:30
committed by Luke H-W
parent e9464784bb
commit 2cfbe78184
40 changed files with 221 additions and 164 deletions

View File

@@ -81,10 +81,10 @@ final class HandbookRequestHandler implements DocumentationHandler {
.replace("{{HEADER_SCENE}}", translate("documentation.handbook.header_scene"))
.replace("{{HEADER_MONSTER}}", translate("documentation.handbook.header_monster"))
// Commands table
.replace("{{COMMANDS_TABLE}}", cmdMap.getAnnotationsAsList()
.replace("{{COMMANDS_TABLE}}", cmdMap.getHandlersAsList()
.stream()
.map(cmd -> "<tr><td><code>" + cmd.label() + "</code></td><td>" +
cmd.description() + "</td></tr>")
.map(cmd -> "<tr><td><code>" + cmd.getLabel() + "</code></td><td>" +
cmd.getDescriptionString(null) + "</td></tr>")
.collect(Collectors.joining("\n")))
// Avatars table
.replace("{{AVATARS_TABLE}}", GameData.getAvatarDataMap().keySet()