diff --git a/functions.lua b/functions.lua index f5b21b8..f634d7b 100644 --- a/functions.lua +++ b/functions.lua @@ -215,7 +215,7 @@ end -- the option to override next_id and provide a value is needed when a new dialog was -- added, then edited, and then discarded; it's still needed after that, but has to -- be reset to empty state (wasn't stored before) -yl_speak_up.add_new_dialog = function(dialog, pname, next_id) +yl_speak_up.add_new_dialog = function(dialog, pname, next_id, dialog_text) if(not(next_id)) then next_id = yl_speak_up.find_next_id(dialog.n_dialogs) end @@ -224,7 +224,7 @@ yl_speak_up.add_new_dialog = function(dialog, pname, next_id) dialog.n_dialogs[future_d_id] = { d_id = future_d_id, d_type = "text", - d_text = "", + d_text = (dialog_text or ""), d_sort = next_id } -- store that there have been changes to this npc