summaryrefslogtreecommitdiffstats
path: root/src/Bindings/ManualBindings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/ManualBindings.cpp')
-rw-r--r--src/Bindings/ManualBindings.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index 841ec5cf2..3571fd7ea 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -8,6 +8,7 @@
#include "PluginLua.h"
#include "PluginManager.h"
#include "LuaWindow.h"
+#include "LuaChunkStay.h"
#include "../Root.h"
#include "../World.h"
#include "../Entities/Player.h"
@@ -1638,6 +1639,42 @@ static int tolua_cPluginManager_CallPlugin(lua_State * tolua_S)
+static int tolua_cLuaChunkStay_Enable(lua_State * tolua_S)
+{
+ cLuaState L(tolua_S);
+ if (
+ !L.CheckParamUserType(1, "cLuaChunkStay") ||
+ !L.CheckParamUserType(2, "cWorld") ||
+ !L.CheckParamFunction(3, 4)
+ )
+ {
+ return 0;
+ }
+
+ // Read the params:
+ cLuaChunkStay * ChunkStay = (cLuaChunkStay *)tolua_tousertype(tolua_S, 1, NULL);
+ if (ChunkStay == NULL)
+ {
+ LOGWARNING("cLuaChunkStay:Enable(): invalid self");
+ L.LogStackTrace();
+ return 0;
+ }
+ cWorld * World = (cWorld *)tolua_tousertype(tolua_S, 2, NULL);
+ if (World == NULL)
+ {
+ LOGWARNING("cLuaChunkStay:Enable(): invalid world parameter");
+ L.LogStackTrace();
+ return 0;
+ }
+
+ ChunkStay->Enable(*World, tolua_S, 3, 4);
+ return 0;
+}
+
+
+
+
+
static int tolua_cPlayer_GetGroups(lua_State* tolua_S)
{
cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0);
@@ -2403,6 +2440,10 @@ void ManualBindings::Bind(lua_State * tolua_S)
tolua_function(tolua_S, "LogStackTrace", tolua_cPluginManager_LogStackTrace);
tolua_endmodule(tolua_S);
+ tolua_beginmodule(tolua_S, "cLuaChunkStay");
+ tolua_function(tolua_S, "Enable", tolua_cLuaChunkStay_Enable);
+ tolua_endmodule(tolua_S);
+
tolua_beginmodule(tolua_S, "cPlayer");
tolua_function(tolua_S, "GetGroups", tolua_cPlayer_GetGroups);
tolua_function(tolua_S, "GetResolvedPermissions", tolua_cPlayer_GetResolvedPermissions);