diff --git a/add_generic_dialogs.lua b/add_generic_dialogs.lua index 83dc3fe..9cd639c 100644 --- a/add_generic_dialogs.lua +++ b/add_generic_dialogs.lua @@ -207,7 +207,7 @@ yl_speak_up.check_and_add_as_generic_dialog = function(dialog, n_id) and r.r_type ~= "take_item" and r.r_type ~= "move" and r.r_type ~= "function" - and r.r_type ~= "custom" + and r.r_type ~= "evaluate" and r.r_type ~= "dialog" ) then return "Effect "..tostring(r_id).. diff --git a/exec_apply_effects.lua b/exec_apply_effects.lua index 44f6f12..5634567 100644 --- a/exec_apply_effects.lua +++ b/exec_apply_effects.lua @@ -794,10 +794,6 @@ yl_speak_up.execute_effect = function(player, n_id, o_id, r) minetest.colorize(yl_speak_up.chat_all_color, text)) -- sending a chat message always counts as successful return true - -- "Call custom functions that are supposed to be overridden by the server.", -- 13 - elseif(r.r_type == "custom") then - -- execute the custom function - return yl_speak_up.effect_custom(player, r.r_value) end -- fallback: unkown type return false diff --git a/fs_edit_effects.lua b/fs_edit_effects.lua index 7476613..bebb2b3 100644 --- a/fs_edit_effects.lua +++ b/fs_edit_effects.lua @@ -66,9 +66,6 @@ -- execute lua code ("function"): requires npc_master priv -- r_value the lua code that shall be executed -- --- call a custom function ("custom"): --- r_value parameter that is passed on to the custom function --- -- Unlike in preconditions, trade (the trade action already happened) and -- inventory actions are not supported as effects. -- @@ -94,7 +91,6 @@ local check_what = { "take item from player and destroy it (requires npc_master priv)", -- 10 "move the player to a given position (requires npc_master priv)", -- 11 "execute Lua code (requires npc_master priv)", -- 12 - "Call custom functions that are supposed to be overridden by the server.", -- 13 } -- how to store these as r_type in the precondition: @@ -108,8 +104,7 @@ local values_what = {"", "state", "craft", "on_failure", "chat_all", -- the following require the npc_master priv: "give_item", "take_item", "move", "function", - -- custom function (does not require npc_master priv) - "custom"} + } -- unlike in the preconditions, the "I cannot punch it" option is -- not offered here - because the player (and later the NPC) needs @@ -282,8 +277,6 @@ yl_speak_up.show_effect = function(r, pname) return "If the *previous* effect failed, go to dialog \""..tostring(r.r_value).. "\"." elseif(r.r_type == "chat_all") then return "Send chat message: \""..tostring(r.r_value).."\"" - elseif(r.r_type == "custom") then - return "Call custom function with param: \""..tostring(r.r_value).."\"." elseif(r.r_type == "put_into_block_inv") then if(not(r.r_pos) or type(r.r_pos) ~= "table" or not(r.r_pos.x) or not(r.r_pos.y) or not(r.r_pos.z)) then