From cfb9987911b32e0e714de254b8b025ae2faf9f85 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Fri, 14 May 2021 22:17:07 +0200 Subject: [PATCH] removed unused functions --- functions.lua | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/functions.lua b/functions.lua index 361ab1d..3a5835d 100644 --- a/functions.lua +++ b/functions.lua @@ -352,43 +352,6 @@ local function delete_option(n_id, d_id, o_id) save_dialog(n_id, dialog) end --- TODO: this function is unused (remove it?) -local function delete_prerequisite(n_id, d_id, o_id, p_id) - if d_id == yl_speak_up.text_new_dialog_id then - return false - end -- We don't delete "New dialog" Also, something might have gone wrong here. - if o_id == yl_speak_up.text_new_option_id then - return false - end -- We don't delete "New option" Also, something might have gone wrong here. - if p_id == yl_speak_up.text_new_prerequisite_id then - return false - end - - local dialog = load_dialog(n_id) - - dialog.n_dialogs[d_id].d_options[o_id].o_prerequisites[p_id] = nil - - save_dialog(n_id, dialog) -end - --- TODO: this function is unused (remove it?) -local function delete_result(n_id, d_id, o_id, r_id) - if d_id == yl_speak_up.text_new_dialog_id then - return false - end -- We don't delete "New dialog" Also, something might have gone wrong here. - if o_id == yl_speak_up.text_new_option_id then - return false - end -- We don't delete "New option" Also, something might have gone wrong here. - if r_id == yl_speak_up.text_new_result_id then - return false - end - - local dialog = load_dialog(n_id) - - dialog.n_dialogs[d_id].d_options[o_id].o_resultss[r_id] = nil - - save_dialog(n_id, dialog) -end local function calculate_displayable_options(pname, d_options) -- Let's go through all the options and see if we need to display them to the user