From 96504404e6ada277c0cbdeb6ec91c5d477ca997b Mon Sep 17 00:00:00 2001 From: OttoLidenbrock Date: Tue, 19 May 2015 12:17:41 +1000 Subject: [PATCH] Change where games looks for mods from mods/ to files/ --- src/script/lua_api/l_mainmenu.cpp | 4 ++-- src/subgame.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index b068040db..e5d2a22a6 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -722,7 +722,7 @@ int ModApiMainMenu::l_get_mapgen_names(lua_State *L) int ModApiMainMenu::l_get_modpath(lua_State *L) { std::string modpath - = fs::RemoveRelativePathComponents(porting::path_user + DIR_DELIM + "mods" + DIR_DELIM); + = fs::RemoveRelativePathComponents(porting::path_user + DIR_DELIM + "files" + DIR_DELIM); lua_pushstring(L, modpath.c_str()); return 1; } @@ -944,7 +944,7 @@ bool ModApiMainMenu::isMinetestPath(std::string path) return true; /* mods */ - if (fs::PathStartsWith(path,fs::RemoveRelativePathComponents(porting::path_user + DIR_DELIM + "mods"))) + if (fs::PathStartsWith(path,fs::RemoveRelativePathComponents(porting::path_user + DIR_DELIM + "files"))) return true; /* worlds */ diff --git a/src/subgame.cpp b/src/subgame.cpp index f736a78c6..95438e9eb 100644 --- a/src/subgame.cpp +++ b/src/subgame.cpp @@ -113,13 +113,13 @@ SubgameSpec findSubgame(const std::string &id) } if(game_path == "") return SubgameSpec(); - std::string gamemod_path = game_path + DIR_DELIM + "mods"; + std::string gamemod_path = game_path + DIR_DELIM + "files"; // Find mod directories std::set mods_paths; if(!user_game) - mods_paths.insert(share + DIR_DELIM + "mods"); + mods_paths.insert(share + DIR_DELIM + "files"); if(user != share || user_game) - mods_paths.insert(user + DIR_DELIM + "mods"); + mods_paths.insert(user + DIR_DELIM + "files"); std::string game_name = getGameName(game_path); if(game_name == "") game_name = id; @@ -140,7 +140,7 @@ SubgameSpec findWorldSubgame(const std::string &world_path) SubgameSpec gamespec; gamespec.id = world_gameid; gamespec.path = world_gamepath; - gamespec.gamemods_path= world_gamepath + DIR_DELIM + "mods"; + gamespec.gamemods_path= world_gamepath + DIR_DELIM + "files"; gamespec.name = getGameName(world_gamepath); if(gamespec.name == "") gamespec.name = "unknown";