From 5877cd11c65a3e34d0558057b21eed8e826290e6 Mon Sep 17 00:00:00 2001 From: Sokomine Date: Thu, 3 Jun 2021 01:16:23 +0200 Subject: [PATCH] some additional comments; in general chat_send_message has mostly been replaced by formspecs now --- functions.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions.lua b/functions.lua index d2705d8..17ebfb6 100644 --- a/functions.lua +++ b/functions.lua @@ -2072,6 +2072,8 @@ yl_speak_up.edit_mode_apply_changes = function(pname, fields) end -- we don't want an infinite amount of answers per dialog if(anz_options >= yl_speak_up.max_number_of_options_per_dialog) then + -- this is already checked earlier on and the button only shown if + -- options can be added; so this can reamin a chat message minetest.chat_send_player(pname, "Sorry. Only ".. tostring(yl_speak_up.max_number_of_options_per_dialog).. " options/answers are allowed per dialog.") @@ -2272,6 +2274,9 @@ yl_speak_up.edit_mode_apply_changes = function(pname, fields) fields["d_id"] = new_dialog fields["show_new_dialog"] = nil else + -- deleting is only possible from the talk menu, and there the delete + -- button is only shown if the dialog can be deleted; so this can remain + -- a chat message minetest.chat_send_player(pname, "Sorry. This dialog cannot be deleted (yet). ".. "It is either the only dialog left or has a non-empty text or has at ".. "least on remaining option/answer.")