master
stujones11 2019-05-17 20:48:46 +01:00
parent ed797ff414
commit b40cd3c590
3 changed files with 5 additions and 4 deletions

View File

@ -73,7 +73,7 @@ local function get_formspec(tabview, name, tabdata)
--favourites
retval = retval .. "tablecolumns[" ..
image_column(fgettext(""), "server_id") .. ";" ..
image_column(fgettext("")) .. ";" ..
image_column(fgettext("Favorite"), "favorite") .. ";" ..
image_column(fgettext("Ping")) .. ",padding=0.25;" ..
"color,span=3;" ..

View File

@ -64,7 +64,7 @@ if minetest.setting_getbool("creative_mode") == false then
local obj = minetest.add_item(pos, name)
if obj ~= nil then
obj:get_luaentity().collect = true
obj:get_luaentity().age = age
obj:get_luaentity().age = 0
obj:setvelocity({x=math.random(-3,3), y=math.random(2,5), z=math.random(-3,3)})
end
end

View File

@ -480,10 +480,11 @@ int ModApiMainMenu::l_get_favorites(lua_State *L)
for (unsigned int i = 0; i < servers.size(); i++)
{
// only list compatible servers
if (!servers[i]["proto_min"].asString().size() ||
if (listtype == "online" && (
!servers[i]["proto_min"].asString().size() ||
!servers[i]["proto_max"].asString().size() ||
servers[i]["proto_min"].asInt() > CLIENT_PROTOCOL_VERSION_MAX ||
servers[i]["proto_max"].asInt() < CLIENT_PROTOCOL_VERSION_MIN)
servers[i]["proto_max"].asInt() < CLIENT_PROTOCOL_VERSION_MIN))
continue;
lua_pushnumber(L,index);