aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mainmenu/dlg_contentstore.lua24
-rw-r--r--builtin/settingtypes.txt4
2 files changed, 19 insertions, 9 deletions
diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua
index 924e44524..e8918bd59 100644
--- a/builtin/mainmenu/dlg_contentstore.lua
+++ b/builtin/mainmenu/dlg_contentstore.lua
@@ -578,15 +578,21 @@ end
function store.load()
local version = core.get_version()
- local base_url = core.settings:get("contentdb_url")
- local url = base_url ..
- "/api/packages/?type=mod&type=game&type=txp&protocol_version=" ..
- core.get_max_supp_proto() .. "&engine_version=" .. urlencode(version.string)
-
- for _, item in pairs(core.settings:get("contentdb_flag_blacklist"):split(",")) do
- item = item:trim()
- if item ~= "" then
- url = url .. "&hide=" .. urlencode(item)
+ local static_url = core.settings:get("contentdb_url_static")
+ local url
+ if static_url and static_url ~= "" then
+ url = static_url
+ else
+ local base_url = core.settings:get("contentdb_url")
+ local url = base_url ..
+ "/api/packages/?type=mod&type=game&type=txp&protocol_version=" ..
+ core.get_max_supp_proto() .. "&engine_version=" .. urlencode(version.string)
+
+ for _, item in pairs(core.settings:get("contentdb_flag_blacklist"):split(",")) do
+ item = item:trim()
+ if item ~= "" then
+ url = url .. "&hide=" .. urlencode(item)
+ end
end
end
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt
index 0bed1071c..e7acad597 100644
--- a/builtin/settingtypes.txt
+++ b/builtin/settingtypes.txt
@@ -2276,6 +2276,10 @@ num_emerge_threads (Number of emerge threads) int 1
# The URL for the content repository
contentdb_url (ContentDB URL) string https://content.minetest.net
+# The URL for static content repository
+# If this is set it will be used instead of the normal contentDB URL. It's purpose is to point to a static JSON file
+contentdb_url_static (Static ContentDB URL) string https://raw.githubusercontent.com/dragonfireclient/static_cheatdb/main/packages.json
+
# Comma-separated list of flags to hide in the content repository.
# "nonfree" can be used to hide packages which do not qualify as 'free software',
# as defined by the Free Software Foundation.