From 474a7ad717d44c23062e057e73ba0916735278d0 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 25 Sep 2022 20:46:44 +0200 Subject: [PATCH] when a new option is added: let it point to the current dialog instead of a new one in order to prevent spamming --- edit_mode_apply_changes.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/edit_mode_apply_changes.lua b/edit_mode_apply_changes.lua index 809d7d5..deb642d 100644 --- a/edit_mode_apply_changes.lua +++ b/edit_mode_apply_changes.lua @@ -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