aboutsummaryrefslogtreecommitdiff
path: root/builtin/modmgr.lua
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2013-08-19 13:55:04 +0200
committerKahrl <kahrl@gmx.net>2013-08-19 15:49:36 +0200
commit4242782dc27e7932e050677b92ec8b1a994a4f0d (patch)
tree220ee3259ea08bef1b9120d3e95ec3d31c93cd9b /builtin/modmgr.lua
parent8548bb75b66f871d1b6941ca9b79012e88274799 (diff)
downloadminetest-4242782dc27e7932e050677b92ec8b1a994a4f0d.tar.gz
minetest-4242782dc27e7932e050677b92ec8b1a994a4f0d.tar.bz2
minetest-4242782dc27e7932e050677b92ec8b1a994a4f0d.zip
World config dialog: Use engine determined path for game mods
Diffstat (limited to 'builtin/modmgr.lua')
-rw-r--r--builtin/modmgr.lua13
1 files changed, 4 insertions, 9 deletions
diff --git a/builtin/modmgr.lua b/builtin/modmgr.lua
index 81ac94c0e..9f5f68a48 100644
--- a/builtin/modmgr.lua
+++ b/builtin/modmgr.lua
@@ -529,9 +529,8 @@ function modmgr.get_worldconfig(worldpath)
end
--read gamemods
- local gamemodpath = engine.get_gamepath() .. DIR_DELIM .. worldconfig.id .. DIR_DELIM .. "mods"
-
- get_mods(gamemodpath,worldconfig.game_mods)
+ local gamespec = gamemgr.find_by_gameid(worldconfig.id)
+ gamemgr.get_game_mods(gamespec, worldconfig.game_mods)
return worldconfig
end
@@ -871,12 +870,8 @@ function modmgr.preparemodlist(data)
end
--read game mods
- if data.gameid ~= nil and
- data.gameid ~= "" then
- local gamemodpath = engine.get_gamepath() .. DIR_DELIM .. data.gameid .. DIR_DELIM .. "mods"
-
- get_mods(gamemodpath,game_mods)
- end
+ local gamespec = gamemgr.find_by_gameid(data.gameid)
+ gamemgr.get_game_mods(gamespec, game_mods)
for i=1,#game_mods,1 do
game_mods[i].typ = "game_mod"