aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_client.cpp8
-rw-r--r--src/script/lua_api/l_client.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp
index 09ea5506b..c982a2f11 100644
--- a/src/script/lua_api/l_client.cpp
+++ b/src/script/lua_api/l_client.cpp
@@ -241,6 +241,13 @@ int ModApiClient::l_get_protocol_version(lua_State *L)
return 1;
}
+int ModApiClient::l_take_screenshot(lua_State *L)
+{
+ Client *client = getClient(L);
+ client->makeScreenshot(client->getDevice());
+ return 0;
+}
+
void ModApiClient::Initialize(lua_State *L, int top)
{
API_FCT(get_current_modname);
@@ -259,4 +266,5 @@ void ModApiClient::Initialize(lua_State *L, int top)
API_FCT(sound_play);
API_FCT(sound_stop);
API_FCT(get_protocol_version);
+ API_FCT(take_screenshot);
}
diff --git a/src/script/lua_api/l_client.h b/src/script/lua_api/l_client.h
index 478b8ed6c..6afcd996b 100644
--- a/src/script/lua_api/l_client.h
+++ b/src/script/lua_api/l_client.h
@@ -72,6 +72,8 @@ private:
// get_protocol_version()
static int l_get_protocol_version(lua_State *L);
+ static int l_take_screenshot(lua_State *L);
+
public:
static void Initialize(lua_State *L, int top);
};