mirror of
https://github.com/RustyRaptor/minetest.git
synced 2026-12-04 08:05:15 -07:00
Add screenshots to online content browser
This commit is contained in:
1 parent
8295f9f89b
commit
122eed7a34
4 files changed
+74
-4
No files matched your search
@@ -1043,9 +1043,21 @@ 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_pushstring (L, "release");
|
||||
lua_pushinteger(L, package.release);
|
||||
lua_settable (L, top_lvl2);
|
||||
lua_settable (L, top_lvl2);
|
||||
|
||||
lua_pushstring(L, "screenshots");
|
||||
lua_newtable(L);
|
||||
{
|
||||
int top_screenshots = lua_gettop(L);
|
||||
for (size_t i = 0; i < package.screenshots.size(); ++i) {
|
||||
lua_pushnumber(L, i + 1);
|
||||
lua_pushstring(L, package.screenshots[i].c_str());
|
||||
lua_settable(L, top_screenshots);
|
||||
}
|
||||
}
|
||||
lua_settable(L, top_lvl2);
|
||||
|
||||
lua_settable(L, top);
|
||||
index++;
|
||||
|
||||
Reference in new issue
Block a user