Remove nametag coloring
This commit is contained in:
parent
8b12a8e4f1
commit
87d0438db6
@ -36,11 +36,6 @@ function ctf_colors.update(player, name, tplayer)
|
||||
|
||||
local tcolor_text, tcolor_hex = ctf_colors.get_color(name, tplayer)
|
||||
|
||||
if ctf.setting("colors.nametag") then
|
||||
player:set_nametag_attributes({
|
||||
color = ctf_colors.get_nametag_color(name, tplayer, tcolor_text, tcolor_hex) })
|
||||
end
|
||||
|
||||
if ctf.setting("colors.hudtint") then
|
||||
if tcolor_text == "red" or tcolor_text == "blue" then
|
||||
print("tinting hud! " .. tcolor_hex)
|
||||
@ -82,21 +77,4 @@ function ctf_colors.update(player, name, tplayer)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
ctf.hud.register_part(ctf_colors.update)
|
||||
|
||||
--[[if minetest.global_exists("armor") and armor.get_player_skin then
|
||||
print("3d_armor detected!")
|
||||
local old = armor.get_player_skin
|
||||
function armor.get_player_skin(self, name)
|
||||
local player = ctf.player(name)
|
||||
local team = ctf.team(player.team)
|
||||
if team and team.data.color and ctf.flag_colors[team.data.color] then
|
||||
print("Return ctf_colors_skin_" .. team.data.color .. ".png")
|
||||
return "ctf_colors_skin_" .. team.data.color .. ".png"
|
||||
end
|
||||
print("ctf_colors -!- Reverting to default armor skin")
|
||||
|
||||
return old(self, name)
|
||||
end
|
||||
end]]
|
||||
|
@ -23,8 +23,6 @@ ctf.flag_colors = ctf_colors.colors
|
||||
ctf.register_on_init(function()
|
||||
ctf.log("colors", "Initialising...")
|
||||
ctf._set("colors.skins", false)
|
||||
ctf._set("colors.nametag", true)
|
||||
ctf._set("colors.nametag.tcolor", false)
|
||||
ctf._set("colors.hudtint", true)
|
||||
ctf._set("hud.teamname", false)
|
||||
end)
|
||||
|
@ -114,24 +114,6 @@ ctf_flag.register_on_pick_up(function(attname, flag)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Change nametag color
|
||||
local oldntc = ctf_colors.get_nametag_color
|
||||
function ctf_colors.get_nametag_color(name, tplayer, tcolor_text, tcolor_hex)
|
||||
if ctf_flag.get_claimed_by_player(name) then
|
||||
return "0xFFFF0000"
|
||||
else
|
||||
return oldntc(name, tplayer, tcolor_text, tcolor_hex)
|
||||
end
|
||||
end
|
||||
|
||||
ctf_flag.register_on_pick_up(function(attname, flag)
|
||||
ctf_colors.update(nil, attname, ctf.player(attname))
|
||||
end)
|
||||
|
||||
ctf_flag.register_on_drop(function(attname, flag)
|
||||
ctf_colors.update(nil, attname, ctf.player(attname))
|
||||
end)
|
||||
|
||||
-- Drop after time
|
||||
local pickup_times = {}
|
||||
ctf_flag.register_on_pick_up(function(attname, flag)
|
||||
|
Loading…
x
Reference in New Issue
Block a user