From 2e40e236af9bfa08d18a6d53bb57162a15531743 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Sun, 1 Oct 2023 20:22:08 +0200 Subject: [PATCH] used check_if_dialog_has_option --- fs_add_quest_steps.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs_add_quest_steps.lua b/fs_add_quest_steps.lua index c2271d0..7770083 100644 --- a/fs_add_quest_steps.lua +++ b/fs_add_quest_steps.lua @@ -661,10 +661,7 @@ yl_speak_up.get_fs_add_quest_steps = function(player, param) local name_txt = "- ? -" local dialog_txt = "- ? -" local option_txt = "- ? -" - if(dialog and dialog.n_dialogs and d_id and o_id - and dialog.n_dialogs[d_id] - and dialog.n_dialogs[d_id].d_options - and dialog.n_dialogs[d_id].d_options[o_id]) then + if(yl_speak_up.check_if_dialog_has_option(dialog, d_id, o_id)) then dialog_txt = dialog.n_dialogs[d_id].d_text or "- ? -" option_txt = dialog.n_dialogs[d_id].d_options[o_id].o_text_when_prerequisites_met or "- ? -" name_txt = (dialog.n_npc or "- ? -")