Improve bounty target kill message (#547)

This commit is contained in:
MinetestSam 2019-12-29 20:47:24 +05:30 committed by ANAND
parent 19d9b3efb8
commit 50599e3009

View file

@ -94,8 +94,13 @@ ctf.register_on_killedplayer(function(victim, killer)
end
bountied_player = nil
local msg = killer .. " has killed " .. victim .. " and received the prize!"
minetest.log("action", msg)
local killer_color = ctf_colors.get_color(ctf.player(killer)).css
local victim_color = ctf_colors.get_color(ctf.player(victim)).css
local msg = minetest.colorize(killer_color, killer) ..
minetest.colorize("#fff326", " has killed ") ..
minetest.colorize(victim_color, victim) ..
minetest.colorize("#fff326", " and received " .. bounty_score .. " points!")
minetest.log("action", minetest.strip_colors(msg))
minetest.chat_send_all(msg)
hud_score.new(killer, {
name = "ctf_bounty:prize",