start of limited range chat feature
This commit is contained in:
parent
7da1c1b949
commit
fe5336ce66
@ -7,13 +7,15 @@ end)
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
chat.local_chat = function(pos,text,radius)
|
chat.local_chat = function(pos,text,radius)
|
||||||
if radius == nil then
|
if radius == nil then
|
||||||
radius = 25
|
radius = 25
|
||||||
end
|
end
|
||||||
local oir = minetest.get_objects_inside_radius(pos, radius)
|
if pos ~= nil then
|
||||||
for _,p in pairs(oir) do
|
local oir = minetest.get_objects_inside_radius(pos, radius)
|
||||||
if p:is_player() then
|
for _,p in pairs(oir) do
|
||||||
minetest.chat_send_player(p:get_player_name(),text)
|
if p:is_player() then
|
||||||
end
|
minetest.chat_send_player(p:get_player_name(),text)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
Loading…
x
Reference in New Issue
Block a user