summaryrefslogtreecommitdiff
path: root/builtin/mainmenu/tab_mods.lua
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2016-12-22 23:16:00 +0100
committerest31 <MTest31@outlook.com>2016-12-22 23:16:00 +0100
commit81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (patch)
tree1e9ef1be1b3295a8673d6e4f0bdeb4c2d3a6015f /builtin/mainmenu/tab_mods.lua
parent8077612dcb48221281e726a60eb97bf73fde462b (diff)
parent231ac33d34dfaaddf292c5f31b1eae43eeefba2d (diff)
downloadminetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.tar.gz
minetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.tar.bz2
minetest-81d56b94919dceb7b2e51d70b21a7ca22f852bd5.zip
Merge 0.4.15 changes into stable-0.4
0.4.15 release!
Diffstat (limited to 'builtin/mainmenu/tab_mods.lua')
-rw-r--r--builtin/mainmenu/tab_mods.lua24
1 files changed, 18 insertions, 6 deletions
diff --git a/builtin/mainmenu/tab_mods.lua b/builtin/mainmenu/tab_mods.lua
index 5b59aa110..4a5b6c041 100644
--- a/builtin/mainmenu/tab_mods.lua
+++ b/builtin/mainmenu/tab_mods.lua
@@ -98,12 +98,24 @@ local function get_formspec(tabview, name, tabdata)
.. fgettext("Uninstall selected modpack") .. "]"
else
--show dependencies
-
- retval = retval .. "," .. fgettext("Depends:") .. ","
-
- local toadd = modmgr.get_dependencies(selected_mod.path)
-
- retval = retval .. toadd .. ";0]"
+ local toadd_hard, toadd_soft = modmgr.get_dependencies(selected_mod.path)
+ if toadd_hard == "" and toadd_soft == "" then
+ retval = retval .. "," .. fgettext("No dependencies.")
+ else
+ if toadd_hard ~= "" then
+ retval = retval .. "," .. fgettext("Dependencies:") .. ","
+ retval = retval .. toadd_hard
+ end
+ if toadd_soft ~= "" then
+ if toadd_hard ~= "" then
+ retval = retval .. ","
+ end
+ retval = retval .. "," .. fgettext("Optional dependencies:") .. ","
+ retval = retval .. toadd_soft
+ end
+ end
+
+ retval = retval .. ";0]"
retval = retval .. "button[5.5,4.85;4.5,0.5;btn_mod_mgr_delete_mod;"
.. fgettext("Uninstall selected mod") .. "]"