From b0ad9a6c3321c58044c5bcb5d2c0d904487d14fa Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 17 Aug 2024 15:49:53 +0100 Subject: [PATCH] Use JSON file for credits (#14956) --- builtin/mainmenu/credits.json | 85 +++++++++++++++++++++++++ builtin/mainmenu/tab_about.lua | 109 +++++---------------------------- 2 files changed, 99 insertions(+), 95 deletions(-) create mode 100644 builtin/mainmenu/credits.json diff --git a/builtin/mainmenu/credits.json b/builtin/mainmenu/credits.json new file mode 100644 index 000000000..261cf5407 --- /dev/null +++ b/builtin/mainmenu/credits.json @@ -0,0 +1,85 @@ +{ + "#": "https://github.com/orgs/minetest/teams/engine/members", + "core_developers": [ + "Perttu Ahola (celeron55) [Project founder]", + "sfan5 ", + "ShadowNinja ", + "Nathanaëlle Courant (Nore/Ekdohibs) ", + "Loic Blot (nerzhul/nrz) ", + "Andrew Ward (rubenwardy) ", + "Krock/SmallJoker ", + "Lars Hofhansl ", + "v-rob ", + "Desour/DS", + "srifqi", + "Gregor Parzefall (grorp)", + "Lars Müller (luatic)" + ], + "previous_core_developers": [ + "BlockMen", + "Maciej Kasatkin (RealBadAngel) [RIP]", + "Lisa Milne (darkrose) ", + "proller", + "Ilya Zhuravlev (xyz) ", + "PilzAdam ", + "est31 ", + "kahrl ", + "Ryan Kwolek (kwolekr) ", + "sapier", + "Zeno", + "Auke Kok (sofar) ", + "Aaron Suen ", + "paramat", + "Pierre-Yves Rollo ", + "hecks", + "Jude Melton-Houghton (TurkeyMcMac) [RIP]", + "Hugues Ross ", + "Dmitry Kostenko (x2048) " + ], + "#": "Currently only https://github.com/orgs/minetest/teams/triagers/members", + "core_team": [ + "Zughy [Issue triager]", + "wsor [Issue triager]", + "Hugo Locurcio (Calinou) [Issue triager]" + ], + "#": "For updating active/previous contributors, see the script in ./util/gather_git_credits.py", + "contributors": [ + "cx384", + "numzero", + "AFCMS", + "sfence", + "Wuzzy", + "ROllerozxa", + "JosiahWI", + "OgelGames", + "David Heidelberg", + "1F616EMO", + "HybridDog", + "Bradley Pierce (Thresher)", + "savilli", + "Stvk imension", + "y5nw", + "chmodsayshello", + "jordan4ibanez", + "superfloh247" + ], + "previous_contributors": [ + "Nils Dagsson Moskopp (erlehmann) [Minetest logo]", + "red-001 ", + "Giuseppe Bilotta", + "HybridDog", + "ClobberXD", + "Dániel Juhász (juhdanad) ", + "MirceaKitsune ", + "Jean-Patrick Guerrero (kilbith)", + "MoNTE48", + "Constantin Wenger (SpeedProg)", + "Ciaran Gultnieks (CiaranG)", + "Paul Ouellette (pauloue)", + "stujones11", + "Rogier ", + "Gregory Currie (gregorycu)", + "JacobF", + "Jeija " + ] +} diff --git a/builtin/mainmenu/tab_about.lua b/builtin/mainmenu/tab_about.lua index d798b5b09..0394ea507 100644 --- a/builtin/mainmenu/tab_about.lua +++ b/builtin/mainmenu/tab_about.lua @@ -15,96 +15,6 @@ --with this program; if not, write to the Free Software Foundation, Inc., --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. --- https://github.com/orgs/minetest/teams/engine/members - -local core_developers = { - "Perttu Ahola (celeron55) [Project founder]", - "sfan5 ", - "ShadowNinja ", - "Nathanaëlle Courant (Nore/Ekdohibs) ", - "Loic Blot (nerzhul/nrz) ", - "Andrew Ward (rubenwardy) ", - "Krock/SmallJoker ", - "Lars Hofhansl ", - "v-rob ", - "Desour/DS", - "srifqi", - "Gregor Parzefall (grorp)", - "Lars Müller (luatic)", -} - --- currently only https://github.com/orgs/minetest/teams/triagers/members - -local core_team = { - "Zughy [Issue triager]", - "wsor [Issue triager]", - "Hugo Locurcio (Calinou) [Issue triager]", -} - --- For updating active/previous contributors, see the script in ./util/gather_git_credits.py - -local active_contributors = { - "cx384", - "numzero", - "AFCMS", - "sfence", - "Wuzzy", - "ROllerozxa", - "JosiahWI", - "OgelGames", - "David Heidelberg", - "1F616EMO", - "HybridDog", - "Bradley Pierce (Thresher)", - "savilli", - "Stvk imension", - "y5nw", - "chmodsayshello", - "jordan4ibanez", - "superfloh247", -} - -local previous_core_developers = { - "BlockMen", - "Maciej Kasatkin (RealBadAngel) [RIP]", - "Lisa Milne (darkrose) ", - "proller", - "Ilya Zhuravlev (xyz) ", - "PilzAdam ", - "est31 ", - "kahrl ", - "Ryan Kwolek (kwolekr) ", - "sapier", - "Zeno", - "Auke Kok (sofar) ", - "Aaron Suen ", - "paramat", - "Pierre-Yves Rollo ", - "hecks", - "Jude Melton-Houghton (TurkeyMcMac) [RIP]", - "Hugues Ross ", - "Dmitry Kostenko (x2048) ", -} - -local previous_contributors = { - "Nils Dagsson Moskopp (erlehmann) [Minetest logo]", - "red-001 ", - "Giuseppe Bilotta", - "HybridDog", - "ClobberXD", - "Dániel Juhász (juhdanad) ", - "MirceaKitsune ", - "Jean-Patrick Guerrero (kilbith)", - "MoNTE48", - "Constantin Wenger (SpeedProg)", - "Ciaran Gultnieks (CiaranG)", - "Paul Ouellette (pauloue)", - "stujones11", - "Rogier ", - "Gregory Currie (gregorycu)", - "JacobF", - "Jeija ", -} local function prepare_credits(dest, source) local string = table.concat(source, "\n") .. "\n" @@ -120,6 +30,13 @@ local function prepare_credits(dest, source) table.insert(dest, string) end +local function get_credits() + local f = assert(io.open(core.get_mainmenu_path() .. "/credits.json")) + local json = core.parse_json(f:read("*all")) + f:close() + return json +end + return { name = "about", caption = fgettext("About"), @@ -133,30 +50,32 @@ return { "", } + local credits = get_credits() + table.insert_all(hypertext, { "", fgettext_ne("Core Developers"), "\n", }) - prepare_credits(hypertext, core_developers) + prepare_credits(hypertext, credits.core_developers) table.insert_all(hypertext, { "\n", "", fgettext_ne("Core Team"), "\n", }) - prepare_credits(hypertext, core_team) + prepare_credits(hypertext, credits.core_team) table.insert_all(hypertext, { "\n", "", fgettext_ne("Active Contributors"), "\n", }) - prepare_credits(hypertext, active_contributors) + prepare_credits(hypertext, credits.contributors) table.insert_all(hypertext, { "\n", "", fgettext_ne("Previous Core Developers"), "\n", }) - prepare_credits(hypertext, previous_core_developers) + prepare_credits(hypertext, credits.previous_core_developers) table.insert_all(hypertext, { "\n", "", fgettext_ne("Previous Contributors"), "\n", }) - prepare_credits(hypertext, previous_contributors) + prepare_credits(hypertext, credits.previous_contributors) hypertext = table.concat(hypertext):sub(1, -2)