From 87d0438db65a41780d02431aee5a286d65a86059 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sun, 21 Jan 2018 20:39:59 +0000 Subject: [PATCH] Remove nametag coloring --- ctf_colors/hud.lua | 22 ---------------------- ctf_colors/init.lua | 2 -- ctf_flag/init.lua | 18 ------------------ 3 files changed, 42 deletions(-) diff --git a/ctf_colors/hud.lua b/ctf_colors/hud.lua index 6b9b503..3fa5b08 100644 --- a/ctf_colors/hud.lua +++ b/ctf_colors/hud.lua @@ -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]] diff --git a/ctf_colors/init.lua b/ctf_colors/init.lua index 09ffd8b..ac6e445 100644 --- a/ctf_colors/init.lua +++ b/ctf_colors/init.lua @@ -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) diff --git a/ctf_flag/init.lua b/ctf_flag/init.lua index 6591405..1022d5e 100644 --- a/ctf_flag/init.lua +++ b/ctf_flag/init.lua @@ -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)