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.")
|
||||
return itemstack
|
||||
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)
|
||||
if tplayer and ctf.team(tplayer.team) then
|
||||
@ -137,7 +143,7 @@ function register_flag(def)
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local tname = tplayer.team
|
||||
local tname = tplayer.team
|
||||
local team = ctf.team(tplayer.team)
|
||||
|
||||
if elementsInTable(team.players) <= elementsInTable(team.flags) then
|
||||
|
Loading…
x
Reference in New Issue
Block a user