1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Remove lots of debug output from modmgr

Fix RUN_IN_PLACE=0 mod install (now mods are saved in user folder in that case)
Fix text of field element not unescaped correctly
This commit is contained in:
sapier 2013-07-12 21:56:09 +02:00 committed by PilzAdam
parent 7dbbbfc665
commit 494fa0c81a
3 changed files with 9 additions and 13 deletions

View file

@ -1010,7 +1010,7 @@ void GUIFormSpecMenu::parseTextArea(parserData* data,std::vector<std::string>& p
}
void GUIFormSpecMenu::parseField(parserData* data,std::string element,std::string type) {
std::vector<std::string> parts = split(element,';');
std::vector<std::string> parts = split(element,';',true);
if (parts.size() == 3) {
parseSimpleField(data,parts);

View file

@ -807,9 +807,8 @@ int guiLuaApi::l_set_topleft_text(lua_State *L)
/******************************************************************************/
int guiLuaApi::l_get_modpath(lua_State *L)
{
//TODO this path may be controversial!
std::string modpath
= fs::RemoveRelativePathComponents(porting::path_share + DIR_DELIM + "mods" + DIR_DELIM);
= fs::RemoveRelativePathComponents(porting::path_user + DIR_DELIM + "mods" + DIR_DELIM);
lua_pushstring(L, modpath.c_str());
return 1;
}
@ -818,7 +817,7 @@ int guiLuaApi::l_get_modpath(lua_State *L)
int guiLuaApi::l_get_gamepath(lua_State *L)
{
std::string gamepath
= fs::RemoveRelativePathComponents(porting::path_share + DIR_DELIM + "games" + DIR_DELIM);
= fs::RemoveRelativePathComponents(porting::path_share + DIR_DELIM + "games" + DIR_DELIM);
lua_pushstring(L, gamepath.c_str());
return 1;
}
@ -1009,7 +1008,7 @@ bool guiLuaApi::isMinetestPath(std::string path) {
return true;
/* mods */
if (fs::PathStartsWith(path,fs::RemoveRelativePathComponents(porting::path_share + DIR_DELIM + "mods")))
if (fs::PathStartsWith(path,fs::RemoveRelativePathComponents(porting::path_user + DIR_DELIM + "mods")))
return true;
/* worlds */