From 0df01b9308898be7df338db8cc58264a2eccb66d Mon Sep 17 00:00:00 2001 From: savilli <78875209+savilli@users.noreply.github.com> Date: Fri, 16 Apr 2021 19:24:24 +0300 Subject: [PATCH 1/3] Fix double map skipping (#866) --- mods/ctf/ctf_match/vote.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mods/ctf/ctf_match/vote.lua b/mods/ctf/ctf_match/vote.lua index eef2c6e..2bfc622 100644 --- a/mods/ctf/ctf_match/vote.lua +++ b/mods/ctf/ctf_match/vote.lua @@ -33,10 +33,12 @@ function ctf_match.vote_next(name) minetest.chat_send_all("Vote to skip match passed, " .. #results.yes .. " to " .. #results.no) - can_vote_skip = false - voted_skip = true - if flags_hold <= 0 then - skip() + if can_vote_skip then + can_vote_skip = false + voted_skip = true + if flags_hold <= 0 then + skip() + end end else minetest.chat_send_all("Vote to skip match failed, " .. From c8612a69e47b1c22ef76822b9a98d9816527eb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= <34514239+appgurueu@users.noreply.github.com> Date: Fri, 16 Apr 2021 19:09:16 +0200 Subject: [PATCH 2/3] Fix bounties being shown to the same team on join (#865) * Fix bounties being shown to the same team on join * Fix submodules --- mods/ctf/ctf_bounties/init.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/mods/ctf/ctf_bounties/init.lua b/mods/ctf/ctf_bounties/init.lua index 8da0251..5badf14 100644 --- a/mods/ctf/ctf_bounties/init.lua +++ b/mods/ctf/ctf_bounties/init.lua @@ -2,7 +2,11 @@ local bountied_player = nil local bounty_score = 0 local function announce(name) - local tcolor = ctf_colors.get_color(ctf.player(bountied_player)) + local bountied = ctf.player(bountied_player) + if ctf.player(name).team == bountied.team then + return + end + local tcolor = ctf_colors.get_color(bountied) minetest.chat_send_player(name, minetest.colorize("#fff326", "The next person to kill ") .. minetest.colorize(tcolor.css, bountied_player) .. @@ -14,10 +18,7 @@ end local function announce_all() if bountied_player then for _, player in pairs(minetest.get_connected_players()) do - local pname = player:get_player_name() - if ctf.player(pname).team ~= ctf.player(bountied_player).team then - announce(pname) - end + announce(player:get_player_name()) end end end From 7733c2cb6786e8657bcc797712a9e132efdf6d73 Mon Sep 17 00:00:00 2001 From: Toby1710 <69259430+DiamondPlane@users.noreply.github.com> Date: Wed, 21 Apr 2021 18:46:56 +0300 Subject: [PATCH 3/3] Prevent empty messages in team chat (#830) * Update init.lua * Update init.lua * Update init.lua * Update mods/ctf/ctf_chat/init.lua Co-authored-by: David Leal * Update init.lua * Update mods/ctf/ctf_chat/init.lua Co-authored-by: David Leal * Update init.lua Co-authored-by: David Leal --- mods/ctf/ctf_chat/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ctf/ctf_chat/init.lua b/mods/ctf/ctf_chat/init.lua index df69b01..bc66d5e 100644 --- a/mods/ctf/ctf_chat/init.lua +++ b/mods/ctf/ctf_chat/init.lua @@ -248,6 +248,9 @@ minetest.register_chatcommand("t", { minetest.chat_send_player(name, "The team channel is disabled.") return end + if param == "" then + return false, "-!- Empty team message, see /help t" + end local tname = ctf.player(name).team local team = ctf.team(tname)