aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-07-29 00:26:03 +0100
committerGitHub <noreply@github.com>2018-07-29 00:26:03 +0100
commit14011bdc7a86f693409f218a8ce2c32dd8f4fe89 (patch)
tree89fa6b6e352d6ed98d256bfd33aba9b631e84c76 /src/script
parent2b83af783bc85963c8088d354ebc9eaea17a92b9 (diff)
downloadminetest-14011bdc7a86f693409f218a8ce2c32dd8f4fe89.tar.gz
minetest-14011bdc7a86f693409f218a8ce2c32dd8f4fe89.tar.bz2
minetest-14011bdc7a86f693409f218a8ce2c32dd8f4fe89.zip
Add protocol_version and supported package types to ContentDB urls
Diffstat (limited to 'src/script')
-rw-r--r--src/script/lua_api/l_mainmenu.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index 03b8fe223..c2f0f6e3a 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -39,6 +39,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <IFileArchive.h>
#include <IFileSystem.h>
#include "client/renderingengine.h"
+#include "network/networkprotocol.h"
/******************************************************************************/
@@ -993,7 +994,9 @@ int ModApiMainMenu::l_get_screen_info(lua_State *L)
int ModApiMainMenu::l_get_package_list(lua_State *L)
{
std::string url = g_settings->get("contentdb_url");
- std::vector<Package> packages = getPackagesFromURL(url + "/api/packages/");
+ std::vector<Package> packages = getPackagesFromURL(url +
+ "/api/packages/?type=mod&type=game&type=txp&protocol_version="
+ LATEST_PROTOCOL_VERSION_STRING);
// Make table
lua_newtable(L);