completed get_fs_edit_option_effect_give_item_or_take_item

This commit is contained in:
Sokomine 2021-07-02 17:26:18 +02:00
parent b70f9bdafe
commit 7f6453ce8c

View File

@ -1463,7 +1463,10 @@ yl_speak_up.get_fs_edit_option_precondition_inv = function(
end
yl_speak_up.get_fs_edit_option_effect_give_item_or_take_item = function(pname, dialog, formspec, data, id_prefix, save_button, e)
-- "give item (created out of thin air) to player (requires npc_master priv)", -- 7
-- "take item from player and destroy it (requires npc_master priv)", -- 8
yl_speak_up.get_fs_edit_option_effect_give_item_or_take_item = function(
pname, dialog, formspec, data, id_prefix, save_button, e)
if(e) then
data.inv_stack_name = e[ "r_value" ] or ""
end
@ -1473,7 +1476,8 @@ yl_speak_up.get_fs_edit_option_effect_give_item_or_take_item = function(pname, d
text = "The following item shall be removed from the player's inventory and "..
"be destroyed:"
end
return "label[0.2,3.0;"..text.."]"..
return formspec..
"label[0.2,3.0;"..text.."]"..
"label[0.2,3.5;Note: You can *save* this effect only if you have the "..
"\"npc_master\" priv!]"..
"label[0.2,4.2;Name of the item(stack):]"..