From f4d348b1f1111905c7d08f58bf4d82fa60a7a319 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Fri, 2 Jul 2021 17:45:21 +0200 Subject: [PATCH] completed get_fs_edit_option_action_text_input and get_fs_edit_option_all_custom --- fs_edit_general.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fs_edit_general.lua b/fs_edit_general.lua index 5dabd6b..565cd3b 100644 --- a/fs_edit_general.lua +++ b/fs_edit_general.lua @@ -1769,7 +1769,10 @@ yl_speak_up.get_fs_edit_option_action_npc_wants = function( end -yl_speak_up.get_fs_edit_option_action_text_input = function(pname, dialog, formspec, data, id_prefix, save_button, e) +-- "The player has to manually enter a password or passphrase or some other text.", -- 6 +-- (only for actions) +yl_speak_up.get_fs_edit_option_action_text_input = function( + pname, dialog, formspec, data, id_prefix, save_button, e) if(e) then data.quest_question = e[ "a_question" ] data.quest_answer = e[ "a_value" ] @@ -1777,7 +1780,8 @@ yl_speak_up.get_fs_edit_option_action_text_input = function(pname, dialog, forms data.action_failure_dialog = math.max(1, table.indexof(sorted_dialog_list, e[ "a_on_failure" ])) end - return "label[0.2,3.3;What to ask the player and which answer to expect:]".. + return formspec.. + "label[0.2,3.3;What to ask the player and which answer to expect:]".. "label[0.2,4.0;Question to show:]".. "field[4.0,3.8;10.0,0.6;quest_question;;".. minetest.formspec_escape( @@ -1808,7 +1812,10 @@ yl_speak_up.get_fs_edit_option_action_text_input = function(pname, dialog, forms end -yl_speak_up.get_fs_edit_option_all_custom = function(pname, dialog, formspec, data, id_prefix, save_button, e) +-- "Call custom functions that are supposed to be overridden by the server.", -- 7 +-- precondition: 8; action: 7; effect: 11 +yl_speak_up.get_fs_edit_option_all_custom = function( + pname, dialog, formspec, data, id_prefix, save_button, e) if(e) then data.custom_param = e[ id_prefix.."value" ] if(id_prefix == "a_") then