mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Serverlist: Add ping indicators (#5164)
This commit is contained in:
parent
3b9ae409c7
commit
03b34cb3dd
8 changed files with 29 additions and 1 deletions
|
@ -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++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue