From e9487c6bde63a692c7d3b9245540b4a3fd2fed2f Mon Sep 17 00:00:00 2001 From: MinetestSam <42088654+MinetestSam@users.noreply.github.com> Date: Wed, 24 Feb 2021 22:23:07 +0530 Subject: [PATCH] Consider captures as a requirement for pro players (#541) Co-authored-by: LoneWolfHT --- mods/ctf/ctf_map/ctf_map_core/chest.lua | 2 +- mods/ctf/ctf_stats/init.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ctf/ctf_map/ctf_map_core/chest.lua b/mods/ctf/ctf_map/ctf_map_core/chest.lua index 7d878c3..6fd8775 100644 --- a/mods/ctf/ctf_map/ctf_map_core/chest.lua +++ b/mods/ctf/ctf_map/ctf_map_core/chest.lua @@ -102,7 +102,7 @@ for _, chest_color in pairs(colors) do else formspec = formspec .. "label[4.75,3;" .. minetest.formspec_escape("You need at least 10000" .. - "\nscore and 1.5+ KD to\naccess the pro section") .. "]" + "\nscore, 1.5+ KD and 10+\ncaptures to access the\npro section") .. "]" end formspec = formspec .. diff --git a/mods/ctf/ctf_stats/init.lua b/mods/ctf/ctf_stats/init.lua index 4c10bd2..8531dcd 100644 --- a/mods/ctf/ctf_stats/init.lua +++ b/mods/ctf/ctf_stats/init.lua @@ -207,7 +207,7 @@ end function ctf_stats.is_pro(name) local stats = ctf_stats.player(name) local kd = stats.kills / (stats.deaths == 0 and 1 or stats.deaths) - return stats.score >= 10000 and kd >= 1.5 + return stats.score >= 10000 and kd >= 1.5 and stats.captures >= 10 end ctf.register_on_join_team(function(name, tname, oldteam)