Compare commits

...

4 commits

Author SHA1 Message Date
philipmi
67214a79ab Merge branch 'master' of https://github.com/MT-CTF/capturetheflag 2021-04-24 21:33:30 +02:00
Toby1710
7733c2cb67
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 <halfpacho@gmail.com>

* Update init.lua

* Update mods/ctf/ctf_chat/init.lua

Co-authored-by: David Leal <halfpacho@gmail.com>

* Update init.lua

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-04-21 08:46:56 -07:00
Lars Müller
c8612a69e4
Fix bounties being shown to the same team on join (#865)
* Fix bounties being shown to the same team on join

* Fix submodules
2021-04-16 10:09:16 -07:00
savilli
0df01b9308
Fix double map skipping (#866) 2021-04-16 09:24:24 -07:00
3 changed files with 15 additions and 9 deletions

View file

@ -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

View file

@ -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)

View file

@ -33,11 +33,13 @@ function ctf_match.vote_next(name)
minetest.chat_send_all("Vote to skip match passed, " ..
#results.yes .. " to " .. #results.no)
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, " ..
#results.no .. " to " .. #results.yes)