completed get_fs_edit_option_action_trade

This commit is contained in:
Sokomine 2021-07-02 17:38:52 +02:00
parent 26d05f3262
commit d74ab72ca7

View File

@ -1636,7 +1636,9 @@ yl_speak_up.get_fs_edit_option_effect_chat_all = function(
end
yl_speak_up.get_fs_edit_option_action_trade = function(pname, dialog, formspec, data, id_prefix, save_button, e)
-- "Normal trade - one item(stack) for another item(stack).", -- 3
yl_speak_up.get_fs_edit_option_action_trade = function(
pname, dialog, formspec, data, id_prefix, save_button, e)
if(e) then
data.trade_id = e[ "a_value" ]
-- use as background images
@ -1661,7 +1663,8 @@ yl_speak_up.get_fs_edit_option_action_trade = function(pname, dialog, formspec,
"item_image[5.15,4.35;0.7,0.7;"..tostring(data.pay).."]"
end
yl_speak_up.speak_to[pname].trade_id = data.trade_id
return "label[8,2.6;Your invnetory:]"..
return formspec..
"label[8,2.6;Your invnetory:]"..
"list[current_player;main;8,3;8,4;]"..
"label[0.2,3.1;Configure trade with "..minetest.formspec_escape(dialog.n_npc)..":]"..
"label[0.5,3.8;The customer pays:]"..