when a new option is added: let it point to the current dialog instead of a new one in order to prevent spamming

This commit is contained in:
Sokomine 2022-09-25 20:46:44 +02:00
parent 937fb8d38f
commit 474a7ad717

View File

@ -169,6 +169,10 @@ yl_speak_up.edit_mode_apply_changes = function(pname, fields)
dialog.n_dialogs[d_id].d_options[future_o_id].o_sort = s
table.insert(yl_speak_up.npc_was_changed[ n_id ],
"Dialog "..d_id..": Added new option/answer "..future_o_id..".")
-- give this new dialog a dialog result that leads back to this dialog
-- (which is more helpful than creating tons of empty dialogs)
local new_target_dialog = yl_speak_up.prepare_new_dialog_for_option(
dialog, pname, n_id, d_id, future_o_id, d_id, nil)
-- if this is selected in the options edit menu, we want to move straight on to the new option
result["show_next_option"] = future_o_id
end