diff options
author | cora <email@example.com> | 2020-10-27 15:20:32 +0100 |
---|---|---|
committer | cora <email@example.com> | 2020-10-27 15:20:32 +0100 |
commit | 4f9797b6e87f62050863f5b17917603290f260c4 (patch) | |
tree | 599859786fd9781df6432732905948ad666569fc /src/script/lua_api/l_client.cpp | |
parent | f1ff05bf5932a7825509dbe896e60183a96a6d36 (diff) | |
download | dragonfireclient-4f9797b6e87f62050863f5b17917603290f260c4.tar.xz |
lua api: add core.take_screenshot()
Diffstat (limited to 'src/script/lua_api/l_client.cpp')
-rw-r--r-- | src/script/lua_api/l_client.cpp | 10 |
1 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 9961471ff..05bfcca52 100644 --- a/src/script/lua_api/l_client.cpp +++ b/src/script/lua_api/l_client.cpp @@ -524,6 +524,14 @@ int ModApiClient::l_get_objects_inside_radius(lua_State *L) return 1; } +//take_screenshot() +int ModApiClient::l_take_screenshot(lua_State *L) +{ + getClient(L)->makeScreenshot(); + lua_pushboolean(L, true); + return 1; +} + void ModApiClient::Initialize(lua_State *L, int top) { API_FCT(get_current_modname); @@ -558,4 +566,6 @@ void ModApiClient::Initialize(lua_State *L, int top) API_FCT(set_keypress); API_FCT(drop_selected_item); API_FCT(get_objects_inside_radius); + API_FCT(take_screenshot); + } |