aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2013-07-15 23:28:55 +0200
committerPilzAdam <pilzadam@minetest.net>2013-07-22 18:09:59 +0200
commitd6c052038fc28db92668821cad5a94683d13d526 (patch)
tree539ea3ed6cf21571c238cfb36521599dda4952bb /builtin
parent8a1658ec3e2d95b3646d5244120a07b8fd5c9158 (diff)
downloadminetest-d6c052038fc28db92668821cad5a94683d13d526.tar.gz
minetest-d6c052038fc28db92668821cad5a94683d13d526.tar.bz2
minetest-d6c052038fc28db92668821cad5a94683d13d526.zip
Add playernumber to favorites list
Diffstat (limited to 'builtin')
-rw-r--r--builtin/mainmenu.lua15
1 files changed, 13 insertions, 2 deletions
diff --git a/builtin/mainmenu.lua b/builtin/mainmenu.lua
index be0654584..90e10abca 100644
--- a/builtin/mainmenu.lua
+++ b/builtin/mainmenu.lua
@@ -44,6 +44,9 @@ function render_favourite(spec,render_details)
return text
end
+
+
+
local details = ""
if spec.password == true then
details = details .. "*"
@@ -68,9 +71,17 @@ function render_favourite(spec,render_details)
else
details = details .. "_"
end
- details = details .. " "
+ details = details .. " "
+
+ local playercount = ""
+
+ if spec.clients ~= nil and
+ spec.clients_max ~= nil then
+ playercount = string.format("%03d",spec.clients) .. "/" ..
+ string.format("%03d",spec.clients_max) .. " "
+ end
- return fs_escape_string(details) .. text
+ return playercount .. fs_escape_string(details) .. text
end
--------------------------------------------------------------------------------