moved a function from _dialogs to _talk
This commit is contained in:
parent
c0fcbecd63
commit
e5183813d7
@ -624,18 +624,6 @@ yl_speak_up.d_id_to_d_name = function(dialog, d_id)
|
||||
end
|
||||
|
||||
|
||||
yl_speak_up.get_sorted_dialog_name_list = function(dialog)
|
||||
local liste = {}
|
||||
if(dialog and dialog.n_dialogs) then
|
||||
for k, v in pairs(dialog.n_dialogs) do
|
||||
-- this will be used for dropdown lists - so we use formspec_escape
|
||||
table.insert(liste, minetest.formspec_escape(v.d_name or k or "?"))
|
||||
end
|
||||
-- sort alphabethicly
|
||||
table.sort(liste)
|
||||
end
|
||||
return liste
|
||||
end
|
||||
|
||||
|
||||
-- how many own (not special, not generic) dialogs does the NPC have?
|
||||
|
@ -36,6 +36,20 @@ yl_speak_up.get_error_message = function()
|
||||
return table.concat(formspec, "")
|
||||
end
|
||||
|
||||
|
||||
yl_speak_up.get_sorted_dialog_name_list = function(dialog)
|
||||
local liste = {}
|
||||
if(dialog and dialog.n_dialogs) then
|
||||
for k, v in pairs(dialog.n_dialogs) do
|
||||
-- this will be used for dropdown lists - so we use formspec_escape
|
||||
table.insert(liste, minetest.formspec_escape(v.d_name or k or "?"))
|
||||
end
|
||||
-- sort alphabethicly
|
||||
table.sort(liste)
|
||||
end
|
||||
return liste
|
||||
end
|
||||
|
||||
---###
|
||||
-- player related
|
||||
---###
|
||||
|
Loading…
Reference in New Issue
Block a user