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

Function PluginCommand

library/include/PluginManager.h:96–108  ·  view source on GitHub ↗

create a command with a name, description, function pointer to its code and saying if it needs an interactive terminal Most commands shouldn't require an interactive terminal! Note that the description and usage fields are only used for out-of-tree plugins that do not have rendered help installed in the hack/docs directory. Help for all internal plugins comes from the rendered .rst files.

Source from the content-addressed store, hash-verified

94 /// the hack/docs directory. Help for all internal plugins comes from
95 /// the rendered .rst files.
96 PluginCommand(const char * _name,
97 const char * _description,
98 command_function function_,
99 bool interactive_ = false,
100 bool unlocked_ = false,
101 const char * usage_ = ""
102 )
103 : name{_name}, description{_description}, function{function_},
104 interactive{interactive_}, unlocked{unlocked_}, guard{NULL},
105 usage{usage_}
106 {
107 fix_usage();
108 }
109
110 PluginCommand(const char * _name,
111 const char * _description,

Calls 1

fix_usageFunction · 0.85

Tested by 2