Fixes
This commit is contained in:
parent
ed797ff414
commit
b40cd3c590
|
@ -73,7 +73,7 @@ local function get_formspec(tabview, name, tabdata)
|
||||||
|
|
||||||
--favourites
|
--favourites
|
||||||
retval = retval .. "tablecolumns[" ..
|
retval = retval .. "tablecolumns[" ..
|
||||||
image_column(fgettext(""), "server_id") .. ";" ..
|
image_column(fgettext("")) .. ";" ..
|
||||||
image_column(fgettext("Favorite"), "favorite") .. ";" ..
|
image_column(fgettext("Favorite"), "favorite") .. ";" ..
|
||||||
image_column(fgettext("Ping")) .. ",padding=0.25;" ..
|
image_column(fgettext("Ping")) .. ",padding=0.25;" ..
|
||||||
"color,span=3;" ..
|
"color,span=3;" ..
|
||||||
|
|
|
@ -64,7 +64,7 @@ if minetest.setting_getbool("creative_mode") == false then
|
||||||
local obj = minetest.add_item(pos, name)
|
local obj = minetest.add_item(pos, name)
|
||||||
if obj ~= nil then
|
if obj ~= nil then
|
||||||
obj:get_luaentity().collect = true
|
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)})
|
obj:setvelocity({x=math.random(-3,3), y=math.random(2,5), z=math.random(-3,3)})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -480,10 +480,11 @@ int ModApiMainMenu::l_get_favorites(lua_State *L)
|
||||||
for (unsigned int i = 0; i < servers.size(); i++)
|
for (unsigned int i = 0; i < servers.size(); i++)
|
||||||
{
|
{
|
||||||
// only list compatible servers
|
// 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_max"].asString().size() ||
|
||||||
servers[i]["proto_min"].asInt() > CLIENT_PROTOCOL_VERSION_MAX ||
|
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;
|
continue;
|
||||||
|
|
||||||
lua_pushnumber(L,index);
|
lua_pushnumber(L,index);
|
||||||
|
|
Loading…
Reference in New Issue