summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-10 23:11:30 +0200
committerMattes D <github@xoft.cz>2015-05-10 23:11:30 +0200
commitdd10ffb63ad98cf2f4df2141a8fd64c21d414529 (patch)
treea8c475c1d0c06dd955694cb05215cfdfdd172aea /src/Bindings/LuaState.cpp
parentExported cPluginManager:ExecuteConsoleCommand() to Lua API. (diff)
downloadcuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.gz
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.bz2
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.lz
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.xz
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.tar.zst
cuberite-dd10ffb63ad98cf2f4df2141a8fd64c21d414529.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaState.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index c96ab083a..fb02569c9 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -958,6 +958,18 @@ void cLuaState::GetStackValue(int a_StackPos, bool & a_ReturnedVal)
+void cLuaState::GetStackValue(int a_StackPos, cPluginManager::CommandResult & a_Result)
+{
+ if (lua_isnumber(m_LuaState, a_StackPos))
+ {
+ a_Result = static_cast<cPluginManager::CommandResult>(static_cast<int>((tolua_tonumber(m_LuaState, a_StackPos, a_Result))));
+ }
+}
+
+
+
+
+
void cLuaState::GetStackValue(int a_StackPos, cRef & a_Ref)
{
a_Ref.RefStack(*this, a_StackPos);