diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-22 12:05:27 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-05-22 12:05:27 +0200 |
commit | 3ff3103e98b350712543f926c429ab339700e252 (patch) | |
tree | 61827d6b7dcb51c38f17f068c8b498c16a0db1c3 /src/script/lua_api | |
parent | 350b6d175c406fbbc002237f37db4cf88d6d3d19 (diff) | |
parent | 9f338f5a56e5adee3d11d59827f7e2b8a714e6c2 (diff) | |
download | dragonfireclient-3ff3103e98b350712543f926c429ab339700e252.tar.xz |
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_mainmenu.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp index 2b46a4d51..411250a0b 100644 --- a/src/script/lua_api/l_mainmenu.cpp +++ b/src/script/lua_api/l_mainmenu.cpp @@ -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"); |