diff options
author | Tycho <work.tycho+git@gmail.com> | 2014-03-12 17:59:10 +0100 |
---|---|---|
committer | Tycho <work.tycho+git@gmail.com> | 2014-03-12 17:59:10 +0100 |
commit | 3caa4a38b9a60afdda0e76cfb267c49ffac1063c (patch) | |
tree | 89bd29d89d6892a94137ebf4829dfe6a4ae3c450 /src/Bindings/LuaState.h | |
parent | Fixed comments an assert (diff) | |
parent | Fixed missing comment terminator. (diff) | |
download | cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.gz cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.bz2 cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.lz cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.xz cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.tar.zst cuberite-3caa4a38b9a60afdda0e76cfb267c49ffac1063c.zip |
Diffstat (limited to 'src/Bindings/LuaState.h')
-rw-r--r-- | src/Bindings/LuaState.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index 4a7a6fadb..73f9629cb 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -29,6 +29,8 @@ extern "C" #include "lua/src/lauxlib.h" } +#include "../Vector3.h" + @@ -52,7 +54,6 @@ class cWebAdmin; struct HTTPTemplateRequest; class cTNTEntity; class cCreeper; -class Vector3i; class cHopperEntity; class cBlockEntity; @@ -139,9 +140,14 @@ public: /** Allows this object to be used in the same way as a lua_State *, for example in the LuaLib functions */ operator lua_State * (void) { return m_LuaState; } - /** Creates the m_LuaState, if not closed already. This state will be automatically closed in the destructor */ + /** Creates the m_LuaState, if not closed already. This state will be automatically closed in the destructor. + The regular Lua libs are registered, but the MCS API is not registered (so that Lua can be used as + lite-config as well), use RegisterAPILibs() to do that. */ void Create(void); + /** Registers all the API libraries that MCS provides into m_LuaState. */ + void RegisterAPILibs(void); + /** Closes the m_LuaState, if not closed already */ void Close(void); |