diff options
Diffstat (limited to 'src/client/lua_api/io/ifilesystem.cpp')
| -rw-r--r-- | src/client/lua_api/io/ifilesystem.cpp | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/src/client/lua_api/io/ifilesystem.cpp b/src/client/lua_api/io/ifilesystem.cpp index 252b61b..12aab78 100644 --- a/src/client/lua_api/io/ifilesystem.cpp +++ b/src/client/lua_api/io/ifilesystem.cpp @@ -1,8 +1,5 @@ #include "ifilesystem.hpp" -/*** -@module io -*/ using namespace irr; using namespace io; @@ -11,7 +8,7 @@ extern IrrlichtDevice* device; /*** A list of files in the current direcotry. -@function list() +@function io.list() @treturn array The files and directories in the current directory. */ // io.list() @@ -36,7 +33,7 @@ int listfilesin(lua_State *L){ /*** Changes the current directory of the program -@function cd(dir) +@function io.cd(dir) @tparam string dir The directory to change to */ // io.cd("directory") @@ -52,10 +49,10 @@ int changedirectory(lua_State *L){ Logs some text with Irrlicht. `level` may be any of: io.LOG_DEBUG, io.LOG_INFO, io.LOG_WARN, io.LOG_ERROR, io.LOG_NONE -@function log(text,level[,hint]) +@function io.log(text,level[,hint]) @tparam string text The text to log @tparam log_level_enum level The log level -@tparam string hint An optional hint to supply with the log +@tparam? string hint An optional hint to supply with the log */ // io.log("text",level) // io.log("text",level[,"hint"]) @@ -83,7 +80,7 @@ int logmessage(lua_State *L){ Sets what output gets logged, and what gets ignored. level may be any of: io.LOG_DEBUG, io.LOG_INFO, io.LOG_WARN, io.LOG_ERROR, io.LOG_NONE -@function set_log_level(level) +@function io.set_log_level(level) @tparam number level the minimul level of log to capture */ //io.set_log_level(level) @@ -120,14 +117,35 @@ void ifilesystem_register(lua_State* L){ lua_getglobal(L,"io");//{io} luaL_register(L,NULL,ifilesystem_f); +/*** +Debugging log level +@field io.LOG_DEBUG +*/ lua_pushnumber(L,ELL_DEBUG); lua_setfield(L,-2,"LOG_DEBUG"); +/*** +Informational log level +@field io.LOG_INTO +*/ lua_pushnumber(L,ELL_INFORMATION); lua_setfield(L,-2,"LOG_INFO"); +/*** +Warning log level +@field io.LOG_WARN +*/ lua_pushnumber(L,ELL_WARNING); lua_setfield(L,-2,"LOG_WARN"); +/*** +Error log level +@field io.LOG_ERROR +*/ lua_pushnumber(L,ELL_ERROR); lua_setfield(L,-2,"LOG_ERROR"); +/*** +Nonetype log level. +Use this with @{io#set_log_level} if you don't want to log anything. +@field io.LOG_NONE +*/ lua_pushnumber(L,ELL_NONE); lua_setfield(L,-2,"LOG_NONE"); |
