exposed config::debug() in the lua interface
The functionality is actually covered by the dbms function I wrote in the WLP, but may be easier to find and use. It would have been useful for me at least, until I had written that function.
This commit is contained in:
parent
737123706d
commit
ac8cdfd23e
1 changed files with 14 additions and 0 deletions
|
@ -1937,6 +1937,19 @@ static int intf_message(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps a wml table or userdata wml object into a pretty string.
|
||||
* - Arg 1: wml table or vconfig userdata
|
||||
* - Ret 1: string
|
||||
*/
|
||||
static int intf_debug(lua_State* L)
|
||||
{
|
||||
const config& arg = luaW_checkconfig(L, 1);
|
||||
const std::string& result = arg.debug();
|
||||
lua_pushstring(L, result.c_str());
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all messages from the chat window.
|
||||
*/
|
||||
|
@ -3393,6 +3406,7 @@ LuaKernel::LuaKernel(const config &cfg)
|
|||
{ "compare_versions", &intf_compare_versions },
|
||||
{ "copy_unit", &intf_copy_unit },
|
||||
{ "create_unit", &intf_create_unit },
|
||||
{ "debug", &intf_debug },
|
||||
{ "delay", &intf_delay },
|
||||
{ "dofile", &intf_dofile },
|
||||
{ "eval_conditional", &intf_eval_conditional },
|
||||
|
|
Loading…
Add table
Reference in a new issue