Prevent players from placing flags below 50 y (#12)
This commit is contained in:
parent
e726fa7725
commit
7df1063468
@ -244,6 +244,13 @@ ctf_flag = {
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if pos.y < -50 then
|
||||||
|
minetest.chat_send_player(name,
|
||||||
|
"Max flag depth is 50 blocks.")
|
||||||
|
minetest.set_node(pos, {name="air"})
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
if not can_place_flag(pos) then
|
if not can_place_flag(pos) then
|
||||||
minetest.chat_send_player(name,
|
minetest.chat_send_player(name,
|
||||||
"Too close to the flag to build! Leave at least " .. r .. " blocks around the flag.")
|
"Too close to the flag to build! Leave at least " .. r .. " blocks around the flag.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user