]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - builtin/mainmenu.lua
Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu
[dragonfireclient.git] / builtin / mainmenu.lua
index 3e3777227210d6299ad21cb2ef2c9ad79b1d70c9..926f3f2d92dc3a58b35dee1e7d36534eca1fe3ab 100644 (file)
@@ -1,3 +1,5 @@
+print = engine.debug
+math.randomseed(os.time())
 os.setlocale("C", "numeric")
 
 local scriptpath = engine.get_scriptdir()
@@ -9,6 +11,7 @@ mt_color_dark_green = "#003300"
 
 --for all other colors ask sfan5 to complete his worK!
 
+dofile(scriptpath .. DIR_DELIM .. "misc_helpers.lua")
 dofile(scriptpath .. DIR_DELIM .. "filterlist.lua")
 dofile(scriptpath .. DIR_DELIM .. "modmgr.lua")
 dofile(scriptpath .. DIR_DELIM .. "modstore.lua")
@@ -864,7 +867,11 @@ function tabbuilder.init()
                end
        end
        
-       menu.update_gametype()
+       if tabbuilder.current_tab ~= "singleplayer" then
+               menu.update_gametype(true)
+       else
+               menu.update_gametype()
+       end
 end
 
 --------------------------------------------------------------------------------
@@ -1006,8 +1013,7 @@ function tabbuilder.tab_TP()
                        "vertlabel[0,-0.25;TEXTURE PACKS]" ..
                        "textlist[4,0.25;7.5,5.0;TPs;" ..
                        menu.render_TP_list(TPlist) ..
-                       ";" .. index .. "]" ..
-                       menubar.formspec
+                       ";" .. index .. "]"
        end
        local TPinfofile = TPpath..DIR_DELIM.."info.txt"
        local f = io.open(TPinfofile, "r")
@@ -1034,8 +1040,7 @@ function tabbuilder.tab_TP()
                        menu.render_TP_list(TPlist) ..
                        ";" .. index .. "]" ..
                        "image[0.65,0.25;4.0,3.7;"..(menu.TPscreen or no_screenshot).."]"..
-                       "textarea[1.0,3.25;3.7,1.5;;"..(menu.TPinfo or "")..";]"..
-                       menubar.formspec
+                       "textarea[1.0,3.25;3.7,1.5;;"..(menu.TPinfo or "")..";]"
 end
 
 --------------------------------------------------------------------------------
@@ -1049,7 +1054,7 @@ function tabbuilder.tab_credits()
                        "Perttu Ahola (celeron55) <celeron55@gmail.com>,"..
                        "Ryan Kwolek (kwolekr) <kwolekr@minetest.net>,"..
                        "PilzAdam <pilzadam@minetest.net>," ..
-                       "IIya Zhuravlev (thexyz) <xyz@minetest.net>,"..
+                       "Ilya Zhuravlev (xyz) <xyz@minetest.net>,"..
                        "Lisa Milne (darkrose) <lisa@ltmnet.com>,"..
                        "Maciej Kasatkin (RealBadAngel) <mk@realbadangel.pl>,"..
                        "proller <proler@gmail.com>,"..