diff options
author | emixa-d <85313564+emixa-d@users.noreply.github.com> | 2021-10-06 22:19:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 00:19:41 +0200 |
commit | 9fab5d594cab4c0a027f0aecf356382f3a37c1de (patch) | |
tree | a5bed4dfac50fcd76464dfb2010713fa4265e5e2 /builtin | |
parent | 53e126ac49807d066328377c7c06352b0fc1a380 (diff) | |
download | minetest-9fab5d594cab4c0a027f0aecf356382f3a37c1de.tar.gz minetest-9fab5d594cab4c0a027f0aecf356382f3a37c1de.tar.bz2 minetest-9fab5d594cab4c0a027f0aecf356382f3a37c1de.zip |
Add "MINETEST_MOD_PATH" environment variable (#11515)
This adds an environment variable MINETEST_MOD_PATH.
When it exists, Minetest will look there for mods in addition to ~/.minetest/mods/.
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/pkgmgr.lua | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua index 787936e31..76d4a4123 100644 --- a/builtin/mainmenu/pkgmgr.lua +++ b/builtin/mainmenu/pkgmgr.lua @@ -682,11 +682,9 @@ function pkgmgr.preparemodlist(data) local game_mods = {} --read global mods - local modpath = core.get_modpath() - - if modpath ~= nil and - modpath ~= "" then - get_mods(modpath,global_mods) + local modpaths = core.get_modpaths() + for _, modpath in ipairs(modpaths) do + get_mods(modpath, global_mods) end for i=1,#global_mods,1 do |