Move: code to right file
This commit is contained in:
parent
d480cdb9f5
commit
e542c3a0c1
@ -129,6 +129,12 @@ function register_flag(def)
|
|||||||
.. " Leave at least " .. r .. " blocks around the flag.")
|
.. " Leave at least " .. r .. " blocks around the flag.")
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local team, index = ctf.get_territory_owner(pos)
|
||||||
|
if team ~= nil then
|
||||||
|
minetest.chat_send_player(name, "You cannot place a flag in a protected area!")
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
local tplayer = ctf.player_or_nil(name)
|
local tplayer = ctf.player_or_nil(name)
|
||||||
if tplayer and ctf.team(tplayer.team) then
|
if tplayer and ctf.team(tplayer.team) then
|
||||||
@ -137,7 +143,7 @@ function register_flag(def)
|
|||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
local tname = tplayer.team
|
local tname = tplayer.team
|
||||||
local team = ctf.team(tplayer.team)
|
local team = ctf.team(tplayer.team)
|
||||||
|
|
||||||
if elementsInTable(team.players) <= elementsInTable(team.flags) then
|
if elementsInTable(team.players) <= elementsInTable(team.flags) then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user