From 50599e300953fd29fbacd052d72cb2a9ddb36304 Mon Sep 17 00:00:00 2001 From: MinetestSam <42088654+MinetestSam@users.noreply.github.com> Date: Sun, 29 Dec 2019 20:47:24 +0530 Subject: [PATCH] Improve bounty target kill message (#547) --- mods/ctf/ctf_bounties/init.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mods/ctf/ctf_bounties/init.lua b/mods/ctf/ctf_bounties/init.lua index 9a18869..604bf0f 100644 --- a/mods/ctf/ctf_bounties/init.lua +++ b/mods/ctf/ctf_bounties/init.lua @@ -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",