moved function get_dialog_list_for_export
This commit is contained in:
parent
06507880b6
commit
c0ed2cc148
@ -1,23 +1,3 @@
|
|||||||
-- helper function that is also used by export_to_ink.lua
|
|
||||||
-- returns a sorted dialog list without special or generic dialogs
|
|
||||||
yl_speak_up.get_dialog_list_for_export = function(dialog)
|
|
||||||
local liste = {}
|
|
||||||
if(not(dialog) or not(dialog.n_dialogs)) then
|
|
||||||
return liste
|
|
||||||
end
|
|
||||||
-- sort the list of dialogs by d_id
|
|
||||||
local liste_sorted = yl_speak_up.sort_keys(dialog.n_dialogs or {}, true)
|
|
||||||
for _, d_id in ipairs(liste_sorted) do
|
|
||||||
-- only normal dialogs - no d_trade, d_got_item, d_dynamic etc;
|
|
||||||
if(not(yl_speak_up.is_special_dialog(d_id))
|
|
||||||
-- also no generic dialogs (they do not come from this NPC)
|
|
||||||
and not(dialog.n_dialogs[d_id].is_generic)) then
|
|
||||||
table.insert(liste, d_id)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return liste
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
yl_speak_up.export_to_simple_dialogs_language = function(dialog, n_id)
|
yl_speak_up.export_to_simple_dialogs_language = function(dialog, n_id)
|
||||||
|
|
||||||
|
@ -80,6 +80,27 @@ yl_speak_up.get_start_dialog_id = function(dialog)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- helper function that is also used by export_to_ink.lua
|
||||||
|
-- returns a sorted dialog list without special or generic dialogs
|
||||||
|
yl_speak_up.get_dialog_list_for_export = function(dialog)
|
||||||
|
local liste = {}
|
||||||
|
if(not(dialog) or not(dialog.n_dialogs)) then
|
||||||
|
return liste
|
||||||
|
end
|
||||||
|
-- sort the list of dialogs by d_id
|
||||||
|
local liste_sorted = yl_speak_up.sort_keys(dialog.n_dialogs or {}, true)
|
||||||
|
for _, d_id in ipairs(liste_sorted) do
|
||||||
|
-- only normal dialogs - no d_trade, d_got_item, d_dynamic etc;
|
||||||
|
if(not(yl_speak_up.is_special_dialog(d_id))
|
||||||
|
-- also no generic dialogs (they do not come from this NPC)
|
||||||
|
and not(dialog.n_dialogs[d_id].is_generic)) then
|
||||||
|
table.insert(liste, d_id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return liste
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--###
|
--###
|
||||||
--Formspecs
|
--Formspecs
|
||||||
--###
|
--###
|
||||||
|
Loading…
Reference in New Issue
Block a user