diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-05-08 11:21:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 16:21:59 +0100 |
commit | f10a260301df44362f2496de4eadc8a8170e10ab (patch) | |
tree | e571619432b9dbcbc6f37ca5acef1c9df35429dc /builtin | |
parent | 54bc8a7627529b1736002a3c942858e0d59ceeba (diff) | |
download | minetest-f10a260301df44362f2496de4eadc8a8170e10ab.tar.gz minetest-f10a260301df44362f2496de4eadc8a8170e10ab.tar.bz2 minetest-f10a260301df44362f2496de4eadc8a8170e10ab.zip |
Enable dependencies when enabling modpacks (#12202)
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/mainmenu/pkgmgr.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua index ce5862ec2..334fcf5f8 100644 --- a/builtin/mainmenu/pkgmgr.lua +++ b/builtin/mainmenu/pkgmgr.lua @@ -454,9 +454,8 @@ function pkgmgr.enable_mod(this, toset) local toggled_mods = {} local enabled_mods = {} toggle_mod_or_modpack(list, toggled_mods, enabled_mods, toset, mod) - toset = mod.enabled -- Update if toggled - if not toset then + if next(enabled_mods) == nil then -- Mod(s) were disabled, so no dependencies need to be enabled table.sort(toggled_mods) core.log("info", "Following mods were disabled: " .. |