mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-29 01:04:29 +00:00
Make the modded help list only what the tree has
- /iris help structure no longer lists the cut place, nor list, info and verify, which live under /iris module now. The group text names import and capture. - /iris help lists the module command. - Rendering the goto and find sections threw "Unknown message key" because the unregistered entry's text was never in the catalog. It is now. - A test checks every documented word of every section against the Brigadier tree, and that every section renders. - 4 localisation keys lost their last user and were removed from the catalog and all 18 files.
This commit is contained in:
1 parent
f7aaed79a6
commit
28d9c34dd2
21 files changed
+102
-105
No files matched your search
+25
@@ -205,6 +205,31 @@ public class IrisModdedCommandParityTest {
|
||||
line.startsWith("/iris pregen start <radius> [dimension] [at] [x] [z] [gui] [sync] [nocache] - ")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void helpListsOnlyWhatTheTreeHas() {
|
||||
CommandNode<CommandSourceStack> iris = irisNode();
|
||||
|
||||
for (String section : ModdedCommandHelp.sections()) {
|
||||
CommandNode<CommandSourceStack> node = section.isEmpty() ? iris : child(iris, section);
|
||||
for (String word : ModdedCommandHelp.documentedWords(section)) {
|
||||
assertNotNull("/iris " + section + " " + word + " is in the help but not in the tree", node.getChild(word));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void everyHelpSectionRendersItsEntries() {
|
||||
for (String section : ModdedCommandHelp.sections()) {
|
||||
assertFalse(section, ModdedCommandHelp.consoleLines(section).isEmpty());
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void structureHelpListsOnlyImportAndCapture() {
|
||||
assertEquals(List.of("import", "import-all", "reimport", "imp", "all", "capture", "cap"),
|
||||
ModdedCommandHelp.documentedWords("structure"));
|
||||
}
|
||||
|
||||
private static CommandNode<CommandSourceStack> child(
|
||||
CommandNode<CommandSourceStack> parent, String name) {
|
||||
CommandNode<CommandSourceStack> child = parent.getChild(name);
|
||||
|
||||
Reference in new issue
Block a user