mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 20:41:11 +01:00
Add disabled trade image
This commit is contained in:
parent
2c55daa3e2
commit
1db3b079c6
2 changed files with 6 additions and 1 deletions
Binary file not shown.
After Width: | Height: | Size: 256 B |
|
@ -387,11 +387,16 @@ local set_trade = function(self, player, inv, concrete_tradenum)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function show_trade_formspec(playername, trader)
|
local function show_trade_formspec(playername, trader, is_disabled)
|
||||||
local profession = professions[trader._profession].name
|
local profession = professions[trader._profession].name
|
||||||
|
local disabled = ""
|
||||||
|
if is_disabled then
|
||||||
|
disabled = "image[4.3,2.52;1,1;mobs_mc_trading_formspec_disabled.png]"
|
||||||
|
end
|
||||||
local formspec =
|
local formspec =
|
||||||
"size[9,8.75]"..
|
"size[9,8.75]"..
|
||||||
"background[-0.19,-0.25;9.41,9.49;mobs_mc_trading_formspec_bg.png]"..
|
"background[-0.19,-0.25;9.41,9.49;mobs_mc_trading_formspec_bg.png]"..
|
||||||
|
disabled..
|
||||||
mcl_vars.inventory_header..
|
mcl_vars.inventory_header..
|
||||||
"label[4,0;"..minetest.formspec_escape(profession).."]"
|
"label[4,0;"..minetest.formspec_escape(profession).."]"
|
||||||
.."list[current_player;main;0,4.5;9,3;9]"
|
.."list[current_player;main;0,4.5;9,3;9]"
|
||||||
|
|
Loading…
Reference in a new issue