forked from your-land-mirror/yl_speak_up
moved preivew/background images to less confusing palces
This commit is contained in:
parent
392b60efb8
commit
c774c542ea
@ -1822,12 +1822,13 @@ yl_speak_up.get_fs_edit_option_effect_craft = function(
|
||||
end
|
||||
local bg_img = ""
|
||||
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
|
||||
if(v and v ~= "") then
|
||||
bg_img = bg_img.."item_image["..
|
||||
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).."]"
|
||||
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;]"..
|
||||
"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 "..
|
||||
"and how. Click on \"Save\" to save.]"..
|
||||
"and how. Click on \"Save\" to save. Currently stored:]"..
|
||||
bg_img..
|
||||
save_button
|
||||
end
|
||||
@ -1959,8 +1960,13 @@ end
|
||||
yl_speak_up.get_fs_edit_option_action_npc_gives = function(
|
||||
pname, dialog, formspec, data, id_prefix, save_button, e)
|
||||
local bg_img = ""
|
||||
if(data and data.item_string) then
|
||||
bg_img = "item_image[2.15,3.65;0.7,0.7;"..tostring(data.item_string).."]"
|
||||
if(e) then
|
||||
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
|
||||
return formspec..
|
||||
"label[8,2.6;Your inventory:]"..
|
||||
@ -2009,8 +2015,13 @@ end
|
||||
yl_speak_up.get_fs_edit_option_action_npc_wants = function(
|
||||
pname, dialog, formspec, data, id_prefix, save_button, e)
|
||||
local bg_img = ""
|
||||
if(data and data.item_string) then
|
||||
bg_img = "item_image[2.15,3.65;0.7,0.7;"..tostring(data.item_string).."]"
|
||||
if(e) then
|
||||
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
|
||||
return formspec..
|
||||
"label[8,2.6;Your inventory:]"..
|
||||
|
Loading…
Reference in New Issue
Block a user