aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-05-16 21:52:12 +0100
committerGitHub <noreply@github.com>2018-05-16 21:52:12 +0100
commit3eb363f813bfc4fbca250579848532ef296b3077 (patch)
tree0ab1ef6ad7a56e068e7519daf9795f402e3f27af /src/script/lua_api
parent45e48295d203b653041404a75c6e2744b78ced45 (diff)
downloadminetest-3eb363f813bfc4fbca250579848532ef296b3077.tar.gz
minetest-3eb363f813bfc4fbca250579848532ef296b3077.tar.bz2
minetest-3eb363f813bfc4fbca250579848532ef296b3077.zip
Add updating to online content browser
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_mainmenu.cpp53
1 files changed, 32 insertions, 21 deletions
diff --git a/src/script/lua_api/l_mainmenu.cpp b/src/script/lua_api/l_mainmenu.cpp
index 241427709..812fdffe7 100644
--- a/src/script/lua_api/l_mainmenu.cpp
+++ b/src/script/lua_api/l_mainmenu.cpp
@@ -443,33 +443,37 @@ int ModApiMainMenu::l_get_games(lua_State *L)
lua_newtable(L);
int top_lvl2 = lua_gettop(L);
- lua_pushstring(L, "id");
- lua_pushstring(L, game.id.c_str());
- lua_settable(L, top_lvl2);
+ lua_pushstring(L, "id");
+ lua_pushstring(L, game.id.c_str());
+ lua_settable(L, top_lvl2);
- lua_pushstring(L, "path");
- lua_pushstring(L, game.path.c_str());
- lua_settable(L, top_lvl2);
+ lua_pushstring(L, "path");
+ lua_pushstring(L, game.path.c_str());
+ lua_settable(L, top_lvl2);
- lua_pushstring(L, "type");
- lua_pushstring(L, "game");
- lua_settable(L, top_lvl2);
+ lua_pushstring(L, "type");
+ lua_pushstring(L, "game");
+ lua_settable(L, top_lvl2);
- lua_pushstring(L, "gamemods_path");
- lua_pushstring(L, game.gamemods_path.c_str());
- lua_settable(L, top_lvl2);
+ lua_pushstring(L, "gamemods_path");
+ lua_pushstring(L, game.gamemods_path.c_str());
+ lua_settable(L, top_lvl2);
- lua_pushstring(L, "name");
- lua_pushstring(L, game.name.c_str());
- lua_settable(L, top_lvl2);
+ lua_pushstring(L, "name");
+ lua_pushstring(L, game.name.c_str());
+ lua_settable(L, top_lvl2);
- lua_pushstring(L, "author");
- lua_pushstring(L, game.author.c_str());
- lua_settable(L, top_lvl2);
+ lua_pushstring(L, "author");
+ lua_pushstring(L, game.author.c_str());
+ lua_settable(L, top_lvl2);
+
+ lua_pushstring(L, "release");
+ lua_pushinteger(L, game.release);
+ lua_settable(L, top_lvl2);
- lua_pushstring(L, "menuicon_path");
- lua_pushstring(L, game.menuicon_path.c_str());
- lua_settable(L, top_lvl2);
+ lua_pushstring(L, "menuicon_path");
+ lua_pushstring(L, game.menuicon_path.c_str());
+ lua_settable(L, top_lvl2);
lua_pushstring(L, "addon_mods_paths");
lua_newtable(L);
@@ -508,6 +512,9 @@ int ModApiMainMenu::l_get_content_info(lua_State *L)
lua_pushstring(L, spec.author.c_str());
lua_setfield(L, -2, "author");
+ lua_pushinteger(L, spec.release);
+ lua_setfield(L, -2, "release");
+
lua_pushstring(L, spec.desc.c_str());
lua_setfield(L, -2, "description");
@@ -1036,6 +1043,10 @@ int ModApiMainMenu::l_get_package_list(lua_State *L)
lua_pushstring(L, package.url.c_str());
lua_settable (L, top_lvl2);
+ lua_pushstring(L, "release");
+ lua_pushinteger(L, package.release);
+ lua_settable (L, top_lvl2);
+
lua_settable(L, top);
index++;
}