summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-04-23 22:20:31 +0200
committerMattes D <github@xoft.cz>2015-04-23 22:20:31 +0200
commita89d5f53fd51d4f7c95e6f32a3b1222f23a9cc35 (patch)
tree79efad21cec681afa82487a7a8a8fe39320ebbf0 /src/Bindings/LuaState.cpp
parentDigging up a clay block spawns 4 clay items. (diff)
downloadcuberite-a89d5f53fd51d4f7c95e6f32a3b1222f23a9cc35.tar
cuberite-a89d5f53fd51d4f7c95e6f32a3b1222f23a9cc35.tar.gz
cuberite-a89d5f53fd51d4f7c95e6f32a3b1222f23a9cc35.tar.bz2
cuberite-a89d5f53fd51d4f7c95e6f32a3b1222f23a9cc35.tar.lz
cuberite-a89d5f53fd51d4f7c95e6f32a3b1222f23a9cc35.tar.xz
cuberite-a89d5f53fd51d4f7c95e6f32a3b1222f23a9cc35.tar.zst
cuberite-a89d5f53fd51d4f7c95e6f32a3b1222f23a9cc35.zip
Diffstat (limited to 'src/Bindings/LuaState.cpp')
-rw-r--r--src/Bindings/LuaState.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 468e54f32..38e008b2a 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -1013,6 +1013,24 @@ void cLuaState::GetStackValue(int a_StackPos, pBoundingBox & a_ReturnedVal)
+void cLuaState::GetStackValue(int a_StackPos, pMapManager & a_ReturnedVal)
+{
+ if (lua_isnil(m_LuaState, a_StackPos))
+ {
+ a_ReturnedVal = nullptr;
+ return;
+ }
+ tolua_Error err;
+ if (tolua_isusertype(m_LuaState, a_StackPos, "cMapManager", false, &err))
+ {
+ a_ReturnedVal = *(reinterpret_cast<cMapManager **>(lua_touserdata(m_LuaState, a_StackPos)));
+ }
+}
+
+
+
+
+
void cLuaState::GetStackValue(int a_StackPos, pPluginManager & a_ReturnedVal)
{
if (lua_isnil(m_LuaState, a_StackPos))