added yl_speak_up.d_id_to_d_name

This commit is contained in:
Sokomine 2024-03-22 17:26:05 +01:00
parent 507123660f
commit 30dfa9c378

View File

@ -758,6 +758,19 @@ yl_speak_up.d_name_to_d_id = function(dialog, d_name)
end
end
-- get the name of a dialog (reverse of above)
yl_speak_up.d_id_to_d_name = function(dialog, d_id)
if(not(dialog) or not(dialog.n_dialogs) or not(d_id) or d_id == ""
or not(dialog.n_dialogs[d_id])
or not(dialog.n_dialogs[d_id].d_name)
or dialog.n_dialogs[d_id].d_name == "") then
return d_id
end
return dialog.n_dialogs[d_id].d_name
end
yl_speak_up.get_sorted_dialog_name_list = function(dialog)
local liste = {}
if(dialog and dialog.n_dialogs) then