diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-05-08 11:21:59 -0400 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2022-05-14 18:33:42 +0200 |
commit | 21f7e3a987650cd8fa2f3fe3aa7aa1fde65ef699 (patch) | |
tree | 9c3293baa0154262e068857ce2bc864aea224406 | |
parent | 9f688bc4336338d438017f9911783cf8944cda21 (diff) | |
download | minetest-21f7e3a987650cd8fa2f3fe3aa7aa1fde65ef699.tar.gz minetest-21f7e3a987650cd8fa2f3fe3aa7aa1fde65ef699.tar.bz2 minetest-21f7e3a987650cd8fa2f3fe3aa7aa1fde65ef699.zip |
Enable dependencies when enabling modpacks (#12202)
-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 1f61d90d9..93505b733 100644 --- a/builtin/mainmenu/pkgmgr.lua +++ b/builtin/mainmenu/pkgmgr.lua @@ -435,9 +435,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: " .. |