]> git.lizzy.rs Git - minetest.git/blobdiff - builtin/mainmenu/tab_mods.lua
Damage flash: Reduce maximum alpha. Avoid fade overload
[minetest.git] / builtin / mainmenu / tab_mods.lua
index d16ecca8c79e2834b6a7dd58b1c4a8963e525d57..5b59aa1107c3467d15a34961ee3f4f2c8718b0ac 100644 (file)
@@ -28,7 +28,7 @@ local function get_formspec(tabview, name, tabdata)
 
        local retval =
                "label[0.05,-0.25;".. fgettext("Installed Mods:") .. "]" ..
-               "textlist[0,0.25;5.1,4.35;modlist;" ..
+               "textlist[0,0.25;5.1,5;modlist;" ..
                modmgr.render_modlist(modmgr.global_mods) ..
                ";" .. tabdata.selected_mod .. "]"
 
@@ -36,7 +36,10 @@ local function get_formspec(tabview, name, tabdata)
 --             "label[0.8,4.2;" .. fgettext("Add mod:") .. "]" ..
 --             TODO Disabled due to upcoming release 0.4.8 and irrlicht messing up localization
 --             "button[0.75,4.85;1.8,0.5;btn_mod_mgr_install_local;".. fgettext("Local install") .. "]" ..
-               "button[0,4.85;5.25,0.5;btn_modstore;".. fgettext("Online mod repository") .. "]"
+
+--             TODO Disabled due to service being offline, and not likely to come online again, in this form
+--             "button[0,4.85;5.25,0.5;btn_modstore;".. fgettext("Online mod repository") .. "]"
+               ""
 
        local selected_mod = nil
 
@@ -57,7 +60,7 @@ local function get_formspec(tabview, name, tabdata)
                end
 
                if modscreenshot == nil then
-                               modscreenshot = modstore.basetexturedir .. "no_screenshot.png"
+                               modscreenshot = defaulttexturedir .. "no_screenshot.png"
                end
 
                retval = retval
@@ -75,7 +78,7 @@ local function get_formspec(tabview, name, tabdata)
                        descriptionfile:close()
                else
                        descriptionlines = {}
-                       table.insert(descriptionlines,fgettext("No mod description available"))
+                       descriptionlines[#descriptionlines + 1] = fgettext("No mod description available")
                end
 
                retval = retval ..
@@ -96,7 +99,7 @@ local function get_formspec(tabview, name, tabdata)
                else
                        --show dependencies
 
-                       retval = retval .. ",Depends:,"
+                       retval = retval .. "," .. fgettext("Depends:") .. ","
 
                        local toadd = modmgr.get_dependencies(selected_mod.path)
 
@@ -160,7 +163,7 @@ local function handle_buttons(tabview, fields, tabname, tabdata)
 end
 
 --------------------------------------------------------------------------------
-tab_mods = {
+return {
        name = "mods",
        caption = fgettext("Mods"),
        cbf_formspec = get_formspec,