lua api: add core.take_screenshot()
This commit is contained in:
parent
f1ff05bf59
commit
4f9797b6e8
@ -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);
|
||||
|
||||
}
|
||||
|
@ -126,6 +126,9 @@ private:
|
||||
// get_objects_inside_radius(pos, radius)
|
||||
static int l_get_objects_inside_radius(lua_State *L);
|
||||
|
||||
//take_screenshot()
|
||||
static int l_take_screenshot(lua_State *L);
|
||||
|
||||
public:
|
||||
static void Initialize(lua_State *L, int top);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user