forked from Sokomine/yl_speak_up
show trade items above slot
This commit is contained in:
parent
c563603583
commit
f3082b7637
@ -327,7 +327,7 @@ yl_speak_up.get_fs_trade_simple = function(player)
|
||||
-- the common formspec, shared by actual trade and configuration
|
||||
-- no listring here as that would make things more complicated
|
||||
local formspec = "size[8.5,8]"..
|
||||
"label[4.35,0.8;"..minetest.formspec_escape(trade.npc_name).." sells:]"..
|
||||
"label[4.35,0.7;"..minetest.formspec_escape(trade.npc_name).." sells:]"..
|
||||
"list[current_player;main;0.2,3.85;8,1;]"..
|
||||
"list[current_player;main;0.2,5.08;8,3;8]"
|
||||
|
||||
@ -427,18 +427,18 @@ yl_speak_up.get_fs_trade_simple = function(player)
|
||||
|
||||
return formspec..
|
||||
"label[2.5,0.0;Trading with "..minetest.formspec_escape(trade.npc_name).."]"..
|
||||
"label[1.5,0.8;You pay:]"..
|
||||
"label[1.5,0.7;You pay:]"..
|
||||
-- show images of price and what is sold so that the player knows what
|
||||
-- it costs and what he will get even if the trade is not possible at
|
||||
-- that moment
|
||||
"item_image[1.1,1.6;0.8,0.8;"..tostring(trade.player_gives).."]"..
|
||||
"item_image[4.1,1.6;0.8,0.8;"..tostring(trade.npc_gives).."]"..
|
||||
"image[3.0,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
|
||||
"item_image[2.1,1.2;0.8,0.8;"..tostring(trade.player_gives).."]"..
|
||||
"item_image[5.1,1.2;0.8,0.8;"..tostring(trade.npc_gives).."]"..
|
||||
"image[3.5,2.0;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
|
||||
-- show the pay slot from the detached player's trade inventory
|
||||
"list[detached:yl_speak_up_player_"..pname..";pay;2,1.5;1,1;]" ..
|
||||
"list[detached:yl_speak_up_player_"..pname..";pay;2,2.0;1,1;]" ..
|
||||
-- show the buy slot from the same inventory
|
||||
"list[detached:yl_speak_up_player_"..pname..";buy;5,1.5;1,1;]" ..
|
||||
"label[1.5,2.8;"..trade_possible_msg.."]"..
|
||||
"list[detached:yl_speak_up_player_"..pname..";buy;5,2.0;1,1;]" ..
|
||||
"label[1.5,3.0;"..trade_possible_msg.."]"..
|
||||
"button[0.2,0.0;2.0,0.9;finished_trading;Back to talk]"..
|
||||
-- "button[6.2,1.6;2.0,0.9;finished_trading;Back to talk]"..
|
||||
"tooltip[finished_trading;Click here once you've traded enough with this "..
|
||||
|
Loading…
Reference in New Issue
Block a user