]> git.lizzy.rs Git - minetest.git/blobdiff - builtin/mainmenu/init.lua
Set acceleration only once in falling node
[minetest.git] / builtin / mainmenu / init.lua
index 6ad2aa88a93ffe8bb5c6338515e15a09b80b706e..69536630dc393b7446b70f9065c20d35a05ce2d8 100644 (file)
@@ -41,6 +41,7 @@ dofile(menupath .. DIR_DELIM .. "dlg_config_world.lua")
 dofile(menupath .. DIR_DELIM .. "tab_credits.lua")
 dofile(menupath .. DIR_DELIM .. "tab_mods.lua")
 dofile(menupath .. DIR_DELIM .. "tab_settings.lua")
+dofile(menupath .. DIR_DELIM .. "dlg_settings_advanced.lua")
 if PLATFORM ~= "Android" then
        dofile(menupath .. DIR_DELIM .. "dlg_create_world.lua")
        dofile(menupath .. DIR_DELIM .. "dlg_delete_mod.lua")
@@ -97,7 +98,7 @@ local function init_globals()
 
                local found_singleplayerworld = false
 
-               for world in pairs(world_list) do
+               for i,world in pairs(world_list) do
                        if world.name == "singleplayerworld" then
                                found_singleplayerworld = true
                                gamedata.worldindex = i
@@ -110,10 +111,10 @@ local function init_globals()
 
                        local world_list = core.get_worlds()
 
-                       for world in pairs(world_list) do
+                       for i,world in pairs(world_list) do
                                if world.name == "singleplayerworld" then
                                        gamedata.worldindex = i
-                                       return
+                                       break
                                end
                        end
                end
@@ -140,9 +141,9 @@ local function init_globals()
 
        tv_main:set_global_event_handler(main_event_handler)
 
-       if PLATFORM == "Android" then
-               tv_main:set_fixed_size(false)
-       else
+       tv_main:set_fixed_size(false)
+
+       if not (PLATFORM == "Android") then
                tv_main:set_tab(core.setting_get("maintab_LAST"))
        end
        ui.set_default("maintab")