forked from Sokomine/yl_speak_up
allow to enter a dialog_text when adding a new dialog via function add_new_dialog
This commit is contained in:
parent
4cb12c2d2d
commit
b2cddab50a
@ -215,7 +215,7 @@ end
|
|||||||
-- the option to override next_id and provide a value is needed when a new dialog was
|
-- 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
|
-- added, then edited, and then discarded; it's still needed after that, but has to
|
||||||
-- be reset to empty state (wasn't stored before)
|
-- 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
|
if(not(next_id)) then
|
||||||
next_id = yl_speak_up.find_next_id(dialog.n_dialogs)
|
next_id = yl_speak_up.find_next_id(dialog.n_dialogs)
|
||||||
end
|
end
|
||||||
@ -224,7 +224,7 @@ yl_speak_up.add_new_dialog = function(dialog, pname, next_id)
|
|||||||
dialog.n_dialogs[future_d_id] = {
|
dialog.n_dialogs[future_d_id] = {
|
||||||
d_id = future_d_id,
|
d_id = future_d_id,
|
||||||
d_type = "text",
|
d_type = "text",
|
||||||
d_text = "",
|
d_text = (dialog_text or ""),
|
||||||
d_sort = next_id
|
d_sort = next_id
|
||||||
}
|
}
|
||||||
-- store that there have been changes to this npc
|
-- store that there have been changes to this npc
|
||||||
|
Loading…
Reference in New Issue
Block a user