update colorstyles and some messages
parent
a0fa370427
commit
8cc712fbe0
|
@ -1,3 +1,4 @@
|
|||
local regular = minetest.setting_get("color_regular")
|
||||
-- Get or add a team
|
||||
function ctf.team(name)
|
||||
if name == nil then
|
||||
|
@ -200,7 +201,7 @@ function ctf.join(name, team, force, by)
|
|||
ctf.needs_save = true
|
||||
|
||||
minetest.log("action", name .. " joined team " .. team)
|
||||
minetest.chat_send_all(core.colorize("#c44eb5", name.." has joined team "..team))
|
||||
minetest.chat_send_all(core.colorize(regular, name.." has joined team "..team))
|
||||
|
||||
for i = 1, #ctf.registered_on_join_team do
|
||||
ctf.registered_on_join_team[i](name, team)
|
||||
|
|
|
@ -11,6 +11,9 @@ function minetest.is_player_name_valid(name)
|
|||
return name:match("^[%a%d_-]+$")
|
||||
end
|
||||
|
||||
local important = minetest.setting_get("color_regular")
|
||||
local failure = minetest.setting_get("color_failure")
|
||||
|
||||
local function team_console_help(name)
|
||||
minetest.chat_send_player(name, "Try:")
|
||||
minetest.chat_send_player(name, "/team - show team panel")
|
||||
|
@ -231,7 +234,7 @@ minetest.register_chatcommand("ctf_reset", {
|
|||
description = "Delete all CTF saved states and start again.",
|
||||
privs = {ctf_admin=true},
|
||||
func = function(name, param)
|
||||
minetest.chat_send_all(core.colorize("#c44eb5", "The CTF core was reset by the admin. All team memberships," ..
|
||||
minetest.chat_send_all(core.colorize(failure, "The CTF core was reset by the admin. All team memberships," ..
|
||||
"flags, land ownerships etc have been deleted."))
|
||||
ctf.reset()
|
||||
return true, "Reset CTF core."
|
||||
|
@ -321,7 +324,7 @@ minetest.register_chatcommand("all", {
|
|||
chatplus.log(tosend)
|
||||
end
|
||||
else
|
||||
minetest.chat_send_all(core.colorize("#c44eb5", "<"..name.."> "..param))
|
||||
minetest.chat_send_all(core.colorize(regular, "<"..name.."> "..param))
|
||||
end
|
||||
end
|
||||
})
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
local regular = minetest.setting_get("color_regular")
|
||||
local failure = minetest.setting_get("color_failure")
|
||||
|
||||
ctf_flag.registered_on_capture = {}
|
||||
function ctf_flag.register_on_capture(func)
|
||||
if ctf._mt_loaded then
|
||||
|
@ -79,7 +82,7 @@ function ctf_flag.player_drop_flag(name)
|
|||
ctf.hud.updateAll()
|
||||
|
||||
ctf.action("flag", name .. " dropped " .. flag_name)
|
||||
minetest.chat_send_all(core.colorize("#c44eb5", flag_name.." has returned."))
|
||||
minetest.chat_send_all(core.colorize(regular, flag_name.." has returned."))
|
||||
|
||||
for i = 1, #ctf_flag.registered_on_drop do
|
||||
ctf_flag.registered_on_drop[i](name, flag)
|
||||
|
@ -167,7 +170,7 @@ function ctf_flag.get(pos)
|
|||
team.flags[i].z == pos.z
|
||||
) then
|
||||
if result then
|
||||
minetest.chat_send_all(core.colorize("#c44eb5", "[CTF ERROR] Multiple teams have same flag. Please report this to the server operator / admin"))
|
||||
minetest.chat_send_all(core.colorize(failure, "[CTF ERROR] Multiple teams have same flag. Please report this to the server operator / admin"))
|
||||
print("CTF ERROR DATA")
|
||||
print("Multiple teams have same flag.")
|
||||
print("This is a sign of ctf.txt corruption.")
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
local important = minetest.setting_get("color_important")
|
||||
local regular = minetest.setting_get("color_regular")
|
||||
|
||||
local function do_capture(attname, flag, returned)
|
||||
local team = flag.team
|
||||
local attacker = ctf.player(attname)
|
||||
|
@ -16,7 +19,7 @@ local function do_capture(attname, flag, returned)
|
|||
end
|
||||
end
|
||||
|
||||
minetest.chat_send_all(core.colorize("#c44eb5", flag_name.." has been picked up by "..
|
||||
minetest.chat_send_all(core.colorize(important, flag_name.." has been picked up by "..
|
||||
attname.." (team "..attacker.team..")"))
|
||||
|
||||
ctf.action("flag", attname .. " picked up " .. flag_name)
|
||||
|
@ -51,7 +54,7 @@ local function do_capture(attname, flag, returned)
|
|||
end
|
||||
end
|
||||
|
||||
minetest.chat_send_all(core.colorize("#c44eb5", flag_name.." has been captured "..
|
||||
minetest.chat_send_all(core.colorize(important, flag_name.." has been captured "..
|
||||
" by "..attname.." (team "..attacker.team..")"))
|
||||
|
||||
ctf.action("flag", attname .. " captured " .. flag_name)
|
||||
|
@ -216,7 +219,7 @@ ctf_flag = {
|
|||
if team.spawn and not ctf.setting("flag.allow_multiple") and
|
||||
minetest.get_node(team.spawn).name == "ctf_flag:flag" then
|
||||
-- send message
|
||||
minetest.chat_send_all(core.colorize("#c44eb5", tname .. "'s flag has been moved"))
|
||||
minetest.chat_send_all(core.colorize(regular, tname .. "'s flag has been moved"))
|
||||
minetest.set_node(team.spawn, {name="air"})
|
||||
minetest.set_node({
|
||||
x = team.spawn.x,
|
||||
|
|
Loading…
Reference in New Issue