mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Serverlist: Add ping indicators (#5164)
This commit is contained in:
@@ -577,6 +577,13 @@ int ModApiMainMenu::l_get_favorites(lua_State *L)
|
||||
lua_settable(L, top_lvl2);
|
||||
}
|
||||
|
||||
if (servers[i].isMember("ping")) {
|
||||
float ping = servers[i]["ping"].asFloat();
|
||||
lua_pushstring(L, "ping");
|
||||
lua_pushnumber(L, ping);
|
||||
lua_settable(L, top_lvl2);
|
||||
}
|
||||
|
||||
lua_settable(L, top);
|
||||
index++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user