]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/script/lua_api/l_mainmenu.cpp
Merge branch 'master' of https://github.com/minetest/minetest
[dragonfireclient.git] / src / script / lua_api / l_mainmenu.cpp
index 2b46a4d51b85041f7eed302d6fe58a7a92f01b40..411250a0b17754fd6c2c9bfc4ead4a5fc5493bb4 100644 (file)
@@ -304,7 +304,11 @@ int ModApiMainMenu::l_get_games(lua_State *L)
                lua_settable(L,    top_lvl2);
 
                lua_pushstring(L,  "name");
-               lua_pushstring(L,  game.name.c_str());
+               lua_pushstring(L,  game.title.c_str());
+               lua_settable(L,    top_lvl2);
+
+               lua_pushstring(L,  "title");
+               lua_pushstring(L,  game.title.c_str());
                lua_settable(L,    top_lvl2);
 
                lua_pushstring(L,  "author");
@@ -356,6 +360,11 @@ int ModApiMainMenu::l_get_content_info(lua_State *L)
        lua_pushstring(L, spec.author.c_str());
        lua_setfield(L, -2, "author");
 
+       if (!spec.title.empty()) {
+               lua_pushstring(L, spec.title.c_str());
+               lua_setfield(L, -2, "title");
+       }
+
        lua_pushinteger(L, spec.release);
        lua_setfield(L, -2, "release");