forked from your-land-mirror/yl_speak_up
removed surplus checks for empty data
This commit is contained in:
parent
0b9b7d6287
commit
f2bba9b270
@ -1548,9 +1548,6 @@ end
|
||||
yl_speak_up.get_fs_edit_option_effect_chat_all = function(pname, dialog, formspec, data, id_prefix, save_button)
|
||||
local default_text = "$NPC_NAME$ (owned by $OWNER_NAME$) announces: $PLAYER_NAME$ "..
|
||||
"- example; please enter the text -"
|
||||
if(not(data)) then
|
||||
data = {}
|
||||
end
|
||||
return
|
||||
"label[0.2,3.3;Send the following chat message to *all* players:]"..
|
||||
"label[0.2,4.1;Message:]"..
|
||||
@ -1603,9 +1600,6 @@ end
|
||||
elseif(data.what and id_prefix == "a_" and data.what == 4) then
|
||||
|
||||
yl_speak_up.get_fs_edit_option_action_npc_gives = function(pname, dialog, formspec, data, id_prefix, save_button)
|
||||
if(not(data)) then
|
||||
data = {}
|
||||
end
|
||||
local bg_img = ""
|
||||
if(data and data.item_string) then
|
||||
bg_img = "item_image[2.15,3.65;0.7,0.7;"..tostring(data.item_string).."]"
|
||||
@ -1657,9 +1651,6 @@ end
|
||||
elseif(data.what and id_prefix == "a_" and data.what == 5) then
|
||||
|
||||
yl_speak_up.get_fs_edit_option_action_npc_wants = function(pname, dialog, formspec, data, id_prefix, save_button)
|
||||
if(not(data)) then
|
||||
data = {}
|
||||
end
|
||||
local bg_img = ""
|
||||
if(data and data.item_string) then
|
||||
bg_img = "item_image[2.15,3.65;0.7,0.7;"..tostring(data.item_string).."]"
|
||||
@ -1698,9 +1689,6 @@ end
|
||||
elseif(data.what and id_prefix == "a_" and data.what == 6) then
|
||||
|
||||
yl_speak_up.get_fs_edit_option_action_text_input = function(pname, dialog, formspec, data, id_prefix, save_button)
|
||||
if(not(data)) then
|
||||
data = {}
|
||||
end
|
||||
return
|
||||
"label[0.2,3.3;What to ask the player and which answer to expect:]"..
|
||||
"label[0.2,4.0;Question to show:]"..
|
||||
@ -1740,9 +1728,6 @@ end
|
||||
or (id_prefix == "r_" and data.what == 11))) then
|
||||
|
||||
yl_speak_up.get_fs_edit_option_action_custom = function(pname, dialog, formspec, data, id_prefix, save_button)
|
||||
if(not(data)) then
|
||||
data = {}
|
||||
end
|
||||
formspec = formspec..
|
||||
"label[0.2,3.3;Note: Calling a custom function will require direct support "..
|
||||
"from the server.]"..
|
||||
|
Loading…
Reference in New Issue
Block a user