aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_mainmenu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index c2f0f6e3a..39a3f3a62 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -993,10 +993,12 @@ 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::string url = g_settings->get("contentdb_url");
+ bool show_nonfree = g_settings->getBool("show_nonfree_packages");
std::vector<Package> packages = getPackagesFromURL(url +
"/api/packages/?type=mod&type=game&type=txp&protocol_version="
- LATEST_PROTOCOL_VERSION_STRING);
+ LATEST_PROTOCOL_VERSION_STRING "&nonfree=" +
+ (show_nonfree ? "true" : "false"));
// Make table
lua_newtable(L);