* `minetest.get_protocol_version()`
* Returns the protocol version of the server.
* Might not be accurate at start up as the client might not be connected to the server yet, in that case it will return 0.
+* `minetest.take_screenshot()`
+ * Take a screenshot.
### Misc.
* `minetest.parse_json(string[, nullvalue])`: returns something
void showGameFog(const bool show = true);
void showGameDebug(const bool show = true);
+ IrrlichtDevice *getDevice() const { return m_device; }
+
private:
// Virtual methods from con::PeerHandler
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);
API_FCT(sound_play);
API_FCT(sound_stop);
API_FCT(get_protocol_version);
+ API_FCT(take_screenshot);
}
// 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);
};