summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-03-15 02:46:18 +0100
committerHowaner <franzi.moos@googlemail.com>2014-03-15 02:46:18 +0100
commit8316ae330ec06b19caf678b9d499afd198fe5a06 (patch)
tree9e120574de49e90f970910ffe743e8169d762ceb /src/Bindings/LuaState.h
parentAdd item frame saving. (diff)
parentIgnoring all config and SQLite files in the output folder. (diff)
downloadcuberite-8316ae330ec06b19caf678b9d499afd198fe5a06.tar
cuberite-8316ae330ec06b19caf678b9d499afd198fe5a06.tar.gz
cuberite-8316ae330ec06b19caf678b9d499afd198fe5a06.tar.bz2
cuberite-8316ae330ec06b19caf678b9d499afd198fe5a06.tar.lz
cuberite-8316ae330ec06b19caf678b9d499afd198fe5a06.tar.xz
cuberite-8316ae330ec06b19caf678b9d499afd198fe5a06.tar.zst
cuberite-8316ae330ec06b19caf678b9d499afd198fe5a06.zip
Diffstat (limited to 'src/Bindings/LuaState.h')
-rw-r--r--src/Bindings/LuaState.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h
index 4a7a6fadb..f5cb8379d 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);
@@ -194,7 +200,7 @@ public:
void Push(const HTTPTemplateRequest * a_Request);
void Push(cTNTEntity * a_TNTEntity);
void Push(Vector3i * a_Vector);
- void Push(void * a_Ptr);
+ NORETURNDEBUG void Push(void * a_Ptr);
void Push(cHopperEntity * a_Hopper);
void Push(cBlockEntity * a_BlockEntity);