diff --git a/functions_dialogs.lua b/functions_dialogs.lua index a83a169..2f74e4d 100644 --- a/functions_dialogs.lua +++ b/functions_dialogs.lua @@ -336,7 +336,7 @@ end -- Note: Preconditions, actions and effects are not handled here (apart from the "dialog" -- effect/result for the redirection to the target dialog) yl_speak_up.update_dialog_option = function(log, dialog, dialog_name, option_name, option_text, target_dialog, - alternate_text, visit_only_once) + alternate_text, visit_only_once, sort_order) -- does the dialog we want to add to exist? local d_id = yl_speak_up.d_name_to_d_id(dialog, dialog_name) if(not(d_id)) then @@ -515,6 +515,10 @@ yl_speak_up.update_dialog_option = function(log, dialog, dialog_name, option_nam and o_data.o_visit_only_once and o_data.o_visit_only_once == 1) then o_data.o_visit_only_once = nil end + -- set sort order of options (no logging because that might get too spammy) + if(sort_oder) then + o_data.o_sort = sort_order + end return o_id end