summaryrefslogtreecommitdiff
path: root/builtin/mainmenu/tab_mods.lua
diff options
context:
space:
mode:
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") .. "]"