move chat message color into var

This commit is contained in:
whosit 2021-05-20 11:42:34 +03:00
parent 672e61ed2d
commit b6a26a651a

View File

@ -10,6 +10,7 @@ local waypoint_color = 0xFFFFFF
local point_range = 180 -- maximun range player can point at (raycast range)
local point_to_objects = true
local point_to_liquids = true
local chat_message_color = "#FF90A8" -- argument to minetest.colorize()
-- return first thing player is pointing at
@ -109,12 +110,12 @@ local function add_announcement(announcer, announcer_name, radius, message, icon
end
local rounded_pos = vector.round(pointed_pos)
minetest.chat_send_all(minetest.colorize("#FF90A8",
"[ANNOUNCE] (" ..
announcer_name ..
") Look: " .. message .. " " ..
minetest.pos_to_string(rounded_pos)))
local chat_message = "[ANNOUNCE] (" ..
announcer_name ..
") Look: " ..
message .. " " ..
minetest.pos_to_string(rounded_pos)
minetest.chat_send_all(minetest.colorize(chat_message_color, chat_message))
end