mcl_craftguide: Autoformat and fix misleading variable names

This commit is contained in:
AFCMS 2022-11-22 23:34:45 +01:00
parent a3fbb2e0c9
commit f8e934c1dd
No known key found for this signature in database
GPG key ID: 8720389A25B652E3

View file

@ -430,13 +430,13 @@ local function get_tooltip(item, groups, cooktime, burntime)
tooltip = groupstr tooltip = groupstr
else else
local groupstr, c = {}, 0 local grouptable, c = {}, 0
for i = 1, #groups do for i = 1, #groups do
c = c + 1 c = c + 1
groupstr[c] = colorize(gcol, groups[i]) grouptable[c] = colorize(gcol, groups[i])
end end
groupstr = concat(groupstr, ", ") groupstr = concat(grouptable, ", ")
tooltip = S("Any item belonging to the groups: @1", groupstr) tooltip = S("Any item belonging to the groups: @1", groupstr)
end end
else else
@ -475,7 +475,7 @@ local function get_recipe_fs(data, iY)
end end
local rows = ceil(maxn(recipe.items) / width) local rows = ceil(maxn(recipe.items) / width)
local rightest, btn_size, s_btn_size = 0, 1.1 local rightest, btn_size, s_btn_size = 0, 1.1, nil
local btn_lab = data.show_usages and local btn_lab = data.show_usages and
ESC(S("Usage @1 of @2", data.rnum, #data.recipes)) or ESC(S("Usage @1 of @2", data.rnum, #data.recipes)) or
@ -741,7 +741,7 @@ mcl_craftguide.add_search_filter("groups", function(item, groups)
for i = 1, #groups do for i = 1, #groups do
local group = groups[i] local group = groups[i]
if not itemdef.groups[group] then if not itemdef.groups[group] then
has_groups = nil has_groups = false
break break
end end
end end