Don't show flags in local favorites
authorsapier <Sapier at GMX dot net>
Fri, 12 Jul 2013 20:55:19 +0000 (22:55 +0200)
committerPilzAdam <pilzadam@minetest.net>
Fri, 12 Jul 2013 20:55:34 +0000 (22:55 +0200)
builtin/mainmenu.lua

index ff2f45b7ec357c588e8eb17ed3a9cd264f730c6a..c8b0e4b872b356a8272e52d9feb66ec060738648 100644 (file)
@@ -12,7 +12,7 @@ local tabbuilder = {}
 local menubar = {}
 
 --------------------------------------------------------------------------------
-function render_favourite(spec)
+function render_favourite(spec,render_details)
        local text = ""
        
        if spec.name ~= nil then
@@ -28,6 +28,10 @@ function render_favourite(spec)
                end
        end
        
+       if not render_details then
+               return text
+       end
+       
        local details = ""
        if spec.password == true then
                details = details .. "*"
@@ -1081,11 +1085,13 @@ function tabbuilder.tab_multiplayer()
                ";]" ..
                "textlist[1,0.35;7.5,3.35;favourites;"
 
+       local render_details = engine.setting_getbool("public_serverlist")
+
        if #menu.favorites > 0 then
-               retval = retval .. render_favourite(menu.favorites[1])
+               retval = retval .. render_favourite(menu.favorites[1],render_details)
                
                for i=2,#menu.favorites,1 do
-                       retval = retval .. "," .. render_favourite(menu.favorites[i])
+                       retval = retval .. "," .. render_favourite(menu.favorites[i],render_details)
                end
        end