moved preivew/background images to less confusing palces

This commit is contained in:
Sokomine 2022-01-02 20:01:24 +01:00
parent 392b60efb8
commit c774c542ea

View File

@ -1822,12 +1822,13 @@ yl_speak_up.get_fs_edit_option_effect_craft = function(
end end
local bg_img = "" local bg_img = ""
if(data and data.craftresult and data.craft_grid) then if(data and data.craftresult and data.craft_grid) then
bg_img = "item_image[5.95,4.90;0.7,0.7;"..tostring(data.craftresult).."]" bg_img = "item_image[5.95,8.70;0.7,0.7;"..tostring(data.craftresult).."]"..
"image[4.6,8.6;1,1;gui_furnace_arrow_bg.png^[transformR270]"
for i, v in ipairs(data.craft_grid) do for i, v in ipairs(data.craft_grid) do
if(v and v ~= "") then if(v and v ~= "") then
bg_img = bg_img.."item_image[".. bg_img = bg_img.."item_image["..
tostring(1.15 + ((i-1)%3)*1.25)..",".. tostring(1.15 + ((i-1)%3)*1.25)..","..
tostring(3.65 + math.floor((i-1)/3)*1.30).. tostring(8.15 + math.floor((i-1)/3)*0.65)..
";0.7,0.7;"..tostring(v).."]" ";0.7,0.7;"..tostring(v).."]"
end end
end end
@ -1840,7 +1841,7 @@ yl_speak_up.get_fs_edit_option_effect_craft = function(
"list[current_player;craftpreview;5.8,4.75;1,1;]".. "list[current_player;craftpreview;5.8,4.75;1,1;]"..
"image[4.6,4.8;1,1;gui_furnace_arrow_bg.png^[transformR270]".. "image[4.6,4.8;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"label[1,8.0;Use your craft grid to show your NPC what to craft ".. "label[1,8.0;Use your craft grid to show your NPC what to craft "..
"and how. Click on \"Save\" to save.]".. "and how. Click on \"Save\" to save. Currently stored:]"..
bg_img.. bg_img..
save_button save_button
end end
@ -1959,8 +1960,13 @@ end
yl_speak_up.get_fs_edit_option_action_npc_gives = function( yl_speak_up.get_fs_edit_option_action_npc_gives = function(
pname, dialog, formspec, data, id_prefix, save_button, e) pname, dialog, formspec, data, id_prefix, save_button, e)
local bg_img = "" local bg_img = ""
if(data and data.item_string) then if(e) then
bg_img = "item_image[2.15,3.65;0.7,0.7;"..tostring(data.item_string).."]" data.item_quest_id = data.item_quest_id or e["item_quest_id"]
data.item_desc = data.item_desc or e["item_desc"]
end
if(data and (data.item_node_name or data.item_string)) then
bg_img = "item_image[1.15,3.65;0.7,0.7;"..
tostring(data.item_node_name or data.item_string).."]"
end end
return formspec.. return formspec..
"label[8,2.6;Your inventory:]".. "label[8,2.6;Your inventory:]"..
@ -2009,8 +2015,13 @@ end
yl_speak_up.get_fs_edit_option_action_npc_wants = function( yl_speak_up.get_fs_edit_option_action_npc_wants = function(
pname, dialog, formspec, data, id_prefix, save_button, e) pname, dialog, formspec, data, id_prefix, save_button, e)
local bg_img = "" local bg_img = ""
if(data and data.item_string) then if(e) then
bg_img = "item_image[2.15,3.65;0.7,0.7;"..tostring(data.item_string).."]" data.item_quest_id = data.item_quest_id or e["item_quest_id"]
data.item_desc = data.item_desc or e["item_desc"]
end
if(data and (data.item_node_name or data.item_string)) then
bg_img = "item_image[1.15,3.65;0.7,0.7;"..
tostring(data.item_node_name or data.item_string).."]"
end end
return formspec.. return formspec..
"label[8,2.6;Your inventory:]".. "label[8,2.6;Your inventory:]"..