Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mainmenu: Priorize non-modpack mod for "enabled" status colorization #11553

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions builtin/mainmenu/pkgmgr.lua
Expand Up @@ -730,13 +730,20 @@ function pkgmgr.preparemodlist(data)
if key:sub(1, 9) == "load_mod_" then
key = key:sub(10)
local element = nil
local modpack_elem = nil
for i=1,#retval,1 do
if retval[i].name == key and
not retval[i].is_modpack then
element = retval[i]
break
if retval[i].modpack then
-- remember the element in modpack and continue to search
modpack_elem = retval[i]
else
element = retval[i]
break
end
end
end
if element == nil then element = modpack_elem end
if element ~= nil then
element.enabled = value ~= "false" and value ~= "nil" and value
else
Expand Down