add comment about plugin docs

develop
myk002 2022-07-17 17:05:29 -07:00
parent 7f302888ec
commit e650bd0942
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 8 additions and 1 deletions

@ -3133,7 +3133,10 @@ static int internal_getCommandHelp(lua_State *L)
{
help += ".";
}
help += "\n" + pc.usage;
if (pc.usage.size())
{
help += "\n" + pc.usage;
}
lua_pushstring(L, help.c_str());
return 1;
}

@ -97,6 +97,10 @@ namespace DFHack
/// 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.
PluginCommand(const char * _name,
const char * _description,
command_function function_,