Compare commits
4 commits
e23dbb3d80
...
67214a79ab
Author | SHA1 | Date | |
---|---|---|---|
|
67214a79ab | ||
|
7733c2cb67 | ||
|
c8612a69e4 | ||
|
0df01b9308 |
3 changed files with 15 additions and 9 deletions
|
@ -2,7 +2,11 @@ local bountied_player = nil
|
||||||
local bounty_score = 0
|
local bounty_score = 0
|
||||||
|
|
||||||
local function announce(name)
|
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.chat_send_player(name,
|
||||||
minetest.colorize("#fff326", "The next person to kill ") ..
|
minetest.colorize("#fff326", "The next person to kill ") ..
|
||||||
minetest.colorize(tcolor.css, bountied_player) ..
|
minetest.colorize(tcolor.css, bountied_player) ..
|
||||||
|
@ -14,10 +18,7 @@ end
|
||||||
local function announce_all()
|
local function announce_all()
|
||||||
if bountied_player then
|
if bountied_player then
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
local pname = player:get_player_name()
|
announce(player:get_player_name())
|
||||||
if ctf.player(pname).team ~= ctf.player(bountied_player).team then
|
|
||||||
announce(pname)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -248,6 +248,9 @@ minetest.register_chatcommand("t", {
|
||||||
minetest.chat_send_player(name, "The team channel is disabled.")
|
minetest.chat_send_player(name, "The team channel is disabled.")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
if param == "" then
|
||||||
|
return false, "-!- Empty team message, see /help t"
|
||||||
|
end
|
||||||
|
|
||||||
local tname = ctf.player(name).team
|
local tname = ctf.player(name).team
|
||||||
local team = ctf.team(tname)
|
local team = ctf.team(tname)
|
||||||
|
|
|
@ -33,10 +33,12 @@ function ctf_match.vote_next(name)
|
||||||
minetest.chat_send_all("Vote to skip match passed, " ..
|
minetest.chat_send_all("Vote to skip match passed, " ..
|
||||||
#results.yes .. " to " .. #results.no)
|
#results.yes .. " to " .. #results.no)
|
||||||
|
|
||||||
can_vote_skip = false
|
if can_vote_skip then
|
||||||
voted_skip = true
|
can_vote_skip = false
|
||||||
if flags_hold <= 0 then
|
voted_skip = true
|
||||||
skip()
|
if flags_hold <= 0 then
|
||||||
|
skip()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
minetest.chat_send_all("Vote to skip match failed, " ..
|
minetest.chat_send_all("Vote to skip match failed, " ..
|
||||||
|
|
Loading…
Reference in a new issue