remove name in front of variables for the player's own variables

This commit is contained in:
Sokomine 2021-06-28 02:14:56 +02:00
parent 66477c494f
commit 71873b7a52

View File

@ -1040,7 +1040,13 @@ yl_speak_up.get_fs_edit_option_related = function(player, table_click_result,
local var_list = get_sorted_player_var_list_function(pname)
local var_list_text = "- please select -"
for i, v in ipairs(var_list) do
var_list_text = var_list_text..","..minetest.formspec_escape(tostring(v))
local parts = string.split(v, " ")
local var_name = v
if(parts and parts[1] and parts[1] == pname) then
table.remove(parts, 1)
var_name = table.concat(parts, " ")
end
var_list_text = var_list_text..","..minetest.formspec_escape(tostring(var_name))
end
formspec = formspec..
"label[0.2,3.3;"..text_variable.."]"..