MCPcopy Create free account
hub / github.com/DFHack/dfhack / help

Method help

library/Commands.cpp:24–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22namespace DFHack
23{
24 command_result Commands::help(color_ostream& con, Core& core, const std::string& first, const std::vector<std::string>& parts)
25 {
26 if (!parts.size())
27 {
28 if (con.is_console())
29 {
30 con.print("This is the DFHack console. You can type commands in and manage DFHack plugins from it.\n"
31 "Some basic editing capabilities are included (single-line text editing).\n"
32 "The console also has a command history - you can navigate it with Up and Down keys.\n"
33 "On Windows, you may have to resize your console window. The appropriate menu is accessible\n"
34 "by clicking on the program icon in the top bar of the window.\n\n");
35 }
36 con.print("Here are some basic commands to get you started:\n"
37 " help|?|man - This text.\n"
38 " help <tool> - Usage help for the given plugin, command, or script.\n"
39 " tags - List the tags that the DFHack tools are grouped by.\n"
40 " ls|dir [<filter>] - List commands, optionally filtered by a tag or substring.\n"
41 " Optional parameters:\n"
42 " --notags: skip printing tags for each command.\n"
43 " --dev: include commands intended for developers and modders.\n"
44 " cls|clear - Clear the console.\n"
45 " fpause - Force DF to pause.\n"
46 " die - Force DF to close immediately, without saving.\n"
47 " keybinding - Modify bindings of commands to in-game key shortcuts.\n"
48 "\n"
49 "See more commands by running 'ls'.\n\n"
50 );
51
52 con.print("DFHack version {}\n", dfhack_version_desc());
53 }
54 else
55 {
56 DFHack::help_helper(con, parts[0]);
57 }
58 return CR_OK;
59 }
60
61 command_result Commands::load(color_ostream& con, Core& core, const std::string& first, const std::vector<std::string>& parts)
62 {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected