Make target name coloured by team in bounty announcement

This commit is contained in:
Anand S 2018-06-20 15:47:26 +05:30 committed by rubenwardy
parent da9ab8ec15
commit 0e1525d282
2 changed files with 6 additions and 2 deletions

View file

@ -1,2 +1,3 @@
ctf
ctf_stats
irc?

View file

@ -2,9 +2,12 @@ local bountied_player = nil
local bounty_score = 0
local function announce(name)
local _, tcolor = ctf_colors.get_color(name, ctf.player(name))
tcolor = tcolor:gsub("0x", "#")
minetest.chat_send_player(name,
minetest.colorize("#fff326", "The next person to kill " .. bountied_player ..
" will receive " .. bounty_score .. " points!"))
minetest.colorize("#fff326", "The next person to kill ") ..
minetest.colorize(tcolor, bountied_player) ..
minetest.colorize("#fff326", " will receive " .. bounty_score .. " points!"))
end
local function announce_all()