Remove unused function ctf.post() (#513)

This commit is contained in:
MinetestSam 2019-11-16 19:01:02 +05:30 committed by ANAND
parent 2dd7a14e31
commit 1c439b163b
2 changed files with 0 additions and 38 deletions

View file

@ -242,24 +242,6 @@ function ctf.can_mod(player,team)
return false return false
end end
-- post a message to a team board
function ctf.post(team, msg)
if not ctf.team(team) then
return false
end
if not ctf.team(team).log then
ctf.team(team).log = {}
end
ctf.log("team", "message posted to team board")
table.insert(ctf.team(team).log, 1, msg)
return true
end
-- Automatic Allocation -- Automatic Allocation
function ctf.autoalloc(name, alloc_mode) function ctf.autoalloc(name, alloc_mode)
alloc_mode = alloc_mode or ctf.setting("allocate_mode") alloc_mode = alloc_mode or ctf.setting("allocate_mode")

View file

@ -21,16 +21,6 @@ local function do_capture(attname, flag, returned)
ctf.action("flag", attname .. " picked up " .. flag_name) ctf.action("flag", attname .. " picked up " .. flag_name)
-- Post to flag owner's board
ctf.post(team, {
msg = flag_name .. " has been taken by " .. attname .. " of ".. attacker.team,
icon="flag_red" })
-- Post to attacker's board
ctf.post(attacker.team, {
msg = attname .. " snatched '" .. flag_name .. "' from " .. team,
icon="flag_green"})
-- Add to claimed list -- Add to claimed list
flag.claimed = { flag.claimed = {
team = attacker.team, team = attacker.team,
@ -56,16 +46,6 @@ local function do_capture(attname, flag, returned)
ctf.action("flag", attname .. " captured " .. flag_name) ctf.action("flag", attname .. " captured " .. flag_name)
-- Post to flag owner's board
ctf.post(team, {
msg = flag_name .. " has been captured by " .. attacker.team,
icon="flag_red"})
-- Post to attacker's board
ctf.post(attacker.team, {
msg = attname .. " captured '" .. flag_name .. "' from " .. team,
icon="flag_green"})
-- Take flag -- Take flag
if ctf.setting("flag.allow_multiple") then if ctf.setting("flag.allow_multiple") then
ctf_flag.delete(team, vector.new(flag)) ctf_flag.delete(team, vector.new(flag))