Minor cleanup

This commit is contained in:
Jean-Patrick Guerrero 2019-02-21 15:31:28 +01:00
parent 7f44517701
commit 7219a6096b

View File

@ -393,8 +393,8 @@ local function get_recipe_fs(data, iY)
local rightest, btn_size, s_btn_size = 0, 1.1
fs[#fs + 1] = fmt("button[%f,%f;%f,%f;%s;%s %u %s %u]",
data.iX - (sfinv_only and 2.2 or 2.6),
iY + (sfinv_only and 3.9 or 3.3),
sfinv_only and 5.8 or data.iX - 2.6,
sfinv_only and 7.9 or iY + 3.3,
2.2,
1,
"alternate",
@ -464,7 +464,7 @@ local function get_recipe_fs(data, iY)
fs[#fs + 1] = fmt(FMT.image,
rightest + 1.2,
iY + (sfinv_only and 2.2 or 1.7),
sfinv_only and 6.2 or iY + 1.7,
0.5,
0.5,
icon)
@ -474,7 +474,7 @@ local function get_recipe_fs(data, iY)
fs[#fs + 1] = fmt("tooltip[%f,%f;%f,%f;%s]",
rightest + 1.2,
iY + (sfinv_only and 2.2 or 1.7),
sfinv_only and 6.2 or iY + 1.7,
0.5,
0.5,
ESC(tooltip))
@ -485,7 +485,7 @@ local function get_recipe_fs(data, iY)
fs[#fs + 1] = fmt(FMT.image,
arrow_X,
iY + (sfinv_only and 2.85 or 2.35),
sfinv_only and 6.85 or iY + 2.35,
0.9,
0.7,
"craftguide_arrow.png")
@ -493,7 +493,7 @@ local function get_recipe_fs(data, iY)
if recipe.type == "fuel" then
fs[#fs + 1] = fmt(FMT.image,
output_X,
iY + (sfinv_only and 2.68 or 2.18),
sfinv_only and 6.68 or iY + 2.18,
1.1,
1.1,
"craftguide_fire.png")
@ -503,7 +503,7 @@ local function get_recipe_fs(data, iY)
fs[#fs + 1] = fmt(FMT.item_image_button,
output_X,
iY + (sfinv_only and 2.7 or 2.2),
sfinv_only and 6.7 or iY + 2.2,
1.1,
1.1,
recipe.output,
@ -515,14 +515,14 @@ local function get_recipe_fs(data, iY)
fs[#fs + 1] = fmt(FMT.image,
output_X + 1,
iY + (sfinv_only and 2.83 or 2.33),
sfinv_only and 6.83 or iY + 2.33,
0.6,
0.4,
"craftguide_arrow.png")
fs[#fs + 1] = fmt(FMT.image,
output_X + 1.6,
iY + (sfinv_only and 2.68 or 2.18),
sfinv_only and 6.68 or iY + 2.18,
0.6,
0.6,
"craftguide_fire.png")
@ -577,7 +577,7 @@ local function make_formspec(name)
ESC(S("Next page")))
fs[#fs + 1] = fmt("label[%f,%f;%s / %u]",
data.iX - (sfinv_only and 1.7 or 2.2),
sfinv_only and 5.7 or data.iX - 2.2,
0.22,
colorize("yellow", data.pagenum),
data.pagemax)
@ -585,8 +585,8 @@ local function make_formspec(name)
fs[#fs + 1] = fmt([[
image_button[%f,0.12;0.8,0.8;craftguide_prev_icon.png;prev;]
image_button[%f,0.12;0.8,0.8;craftguide_next_icon.png;next;] ]],
data.iX - (sfinv_only and 2.6 or 3.1),
data.iX - (sfinv_only and 0.7 or 1.2) - (data.iX >= 11 and 0.08 or 0))
sfinv_only and 6.6 or data.iX - 3.1,
sfinv_only and 7.3 or (data.iX - 1.2) - (data.iX >= 11 and 0.08 or 0))
fs[#fs + 1] = fmt("field[0.3,0.32;2.5,1;filter;;%s]", ESC(data.filter))