diff options
author | Vincent Glize <vincentglize@hotmail.fr> | 2017-04-29 09:16:06 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-04-29 09:16:06 +0200 |
commit | 19960e26c672c6337f8c6ffbe27f2c6bca49750c (patch) | |
tree | 8913f6063be732c009eac19285bf1fcbbec95d08 /src/script/lua_api/l_client.cpp | |
parent | b662a4577d692329b9ca83525e6039f2ddcd1ac1 (diff) | |
download | minetest-19960e26c672c6337f8c6ffbe27f2c6bca49750c.tar.gz minetest-19960e26c672c6337f8c6ffbe27f2c6bca49750c.tar.bz2 minetest-19960e26c672c6337f8c6ffbe27f2c6bca49750c.zip |
[CSM] add screenshot api lua (#5674)
* [CSM] add screenshot api lua
Diffstat (limited to 'src/script/lua_api/l_client.cpp')
-rw-r--r-- | src/script/lua_api/l_client.cpp | 8 |
1 files changed, 8 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); } |