forked from Sokomine/yl_speak_up
completed get_fs_edit_option_p_and_e_function
This commit is contained in:
parent
a7ba7f8e85
commit
cc1c1854d6
@ -1521,14 +1521,16 @@ yl_speak_up.get_fs_edit_option_effect_move = function(
|
||||
end
|
||||
|
||||
|
||||
-- for "precondition and effect"
|
||||
yl_speak_up.get_fs_edit_option_p_and_e_function = function(pname, dialog, formspec, data, id_prefix, save_button, e)
|
||||
-- "execute Lua code (requires npc_master priv)", -- precondition: 7; effect: 10
|
||||
yl_speak_up.get_fs_edit_option_p_and_e_function = function(
|
||||
pname, dialog, formspec, data, id_prefix, save_button, e)
|
||||
if(e) then
|
||||
if(e[ id_prefix.."value"] and e[ id_prefix.."value"] ~= "") then
|
||||
data.lua_code = e[ id_prefix.."value" ]
|
||||
end
|
||||
end
|
||||
return "label[0.2,3.0;Execute the following Lua code (ought to return true or false):]"..
|
||||
return formspec..
|
||||
"label[0.2,3.0;Execute the following Lua code (ought to return true or false):]"..
|
||||
"label[0.2,3.5;Note: You can *save* this effect only if you have the "..
|
||||
"\"npc_master\" priv!]"..
|
||||
"textarea[0.2,4.5;20,4.0;lua_code;;"..
|
||||
|
Loading…
Reference in New Issue
Block a user