forked from minetest-mods/MoreMesecons
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f845984b92
@ -4,7 +4,7 @@
|
||||
|
||||
local function make_formspec(meta)
|
||||
meta:set_string("formspec", "size[9,5]" ..
|
||||
"field[0.3, 0;9,2;scanname;Coma-separated list of the names of players to scan for (empty for any):;${scanname}]"..
|
||||
"field[0.3, 0;9,2;scanname;Comma-separated list of the names of players to scan for (empty for any):;${scanname}]"..
|
||||
"field[0.3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]"..
|
||||
"field[0.3,3;4,2;radius;Detection radius:;${radius}]"..
|
||||
"button_exit[3.5,3.5;2,3;;Save]")
|
||||
|
@ -52,11 +52,11 @@ local function receive_fields(pos, _, fields, player)
|
||||
end
|
||||
|
||||
local function resolve_commands(commands, pos)
|
||||
local nearest = nil
|
||||
local nearest = ""
|
||||
local min_distance = math.huge
|
||||
local players = minetest.get_connected_players()
|
||||
for _, player in pairs(players) do
|
||||
local distance = vector.distance(pos, player:getpos())
|
||||
local distance = vector.distance(pos, player:get_pos())
|
||||
if distance < min_distance then
|
||||
min_distance = distance
|
||||
nearest = player:get_player_name()
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
local function make_formspec(meta)
|
||||
meta:set_string("formspec", "size[9,5]" ..
|
||||
"field[0.3, 0;9,2;scanname;Coma-separated list of the names (itemstring) of entities to scan for (empty for any):;${scanname}]"..
|
||||
"field[0.3, 0;9,2;scanname;Comma-separated list of the names (itemstring) of entities to scan for (empty for any):;${scanname}]"..
|
||||
"field[0.3,1.5;4,2;digiline_channel;Digiline Channel (optional):;${digiline_channel}]"..
|
||||
"field[0.3,3;2,2;radius;Detection radius:;${radius}]"..
|
||||
"button_exit[3.5,3.5;2,3;;Save]")
|
||||
|
Loading…
Reference in New Issue
Block a user