Use contributions labels instead of code

This commit is contained in:
Athozus 2024-03-30 21:21:44 +01:00
parent 9a57a3cf40
commit 6cf4618bb1
No known key found for this signature in database
GPG key ID: B50895022E8484BF

View file

@ -71,21 +71,19 @@ function mail.show_about(name)
box[4,0;3,0.45;]] .. mail.get_color("highlighted") .. [[] box[4,0;3,0.45;]] .. mail.get_color("highlighted") .. [[]
label[4.2,0;]] .. S("Contributors") .. [[] label[4.2,0;]] .. S("Contributors") .. [[]
tablecolumns[text;text;text;text;text;text] tablecolumns[text;text]
table[4,0.75;5.9,5.5;contributors;]] table[4,0.75;5.9,5.5;contributors;]]
for _, c in ipairs(contributors) do for _, c in ipairs(contributors) do
formspec = formspec .. c.name .. "," formspec = formspec .. c.name
for _, g in ipairs(groups) do for _, g in ipairs(groups) do
if table.indexof(c.groups, g[1]) >= 1 then if table.indexof(c.groups, g[1]) >= 1 then
formspec = formspec .. string.upper(g[1]) .. "," formspec = formspec .. "," .. g[2] .. ","
end end
end end
for _ = 1, (#groups-#c.groups) do
formspec = formspec .. ","
end
end end
formspec = string.sub(formspec, 2, -2) -- remove last blank line
formspec = formspec .. mail.theme formspec = formspec .. mail.theme
minetest.show_formspec(name, FORMNAME, formspec) minetest.show_formspec(name, FORMNAME, formspec)