Remove some unessecerary [resize
This commit is contained in:
parent
f0f94017da
commit
e17e1080d3
|
@ -319,17 +319,21 @@ local function get_cube(tiles)
|
||||||
return draw_cube(top, left, right)
|
return draw_cube(top, left, right)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function is_cube(drawtype)
|
||||||
|
return drawtype == "normal" or drawtype == "liquid" or
|
||||||
|
sub(drawtype, 1, 9) == "glasslike" or
|
||||||
|
sub(drawtype, 1, 8) == "allfaces"
|
||||||
|
end
|
||||||
|
|
||||||
local function init_cubes()
|
local function init_cubes()
|
||||||
for name, def in pairs(reg_nodes) do
|
for name, def in pairs(reg_nodes) do
|
||||||
if def then
|
if def then
|
||||||
local id = core.get_content_id(name)
|
local id = core.get_content_id(name)
|
||||||
|
|
||||||
if def.drawtype == "normal" or def.drawtype == "liquid" or
|
if is_cube(def.drawtype) then
|
||||||
sub(def.drawtype, 1, 9) == "glasslike" or
|
|
||||||
sub(def.drawtype, 1, 8) == "allfaces" then
|
|
||||||
i3.cubes[id] = get_cube(def.tiles)
|
i3.cubes[id] = get_cube(def.tiles)
|
||||||
elseif sub(def.drawtype, 1, 9) == "plantlike" or sub(def.drawtype, 1, 8) == "firelike" then
|
elseif sub(def.drawtype, 1, 9) == "plantlike" or sub(def.drawtype, 1, 8) == "firelike" then
|
||||||
i3.plants[id] = def.inventory_image .. "^\\[resize:16x16"
|
i3.plants[id] = def.inventory_image
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -840,7 +840,7 @@ local function get_output_fs(fs, data, rcp, is_recipe, shapeless, right, btn_siz
|
||||||
local icon, tooltip = PNG.blank
|
local icon, tooltip = PNG.blank
|
||||||
|
|
||||||
if custom_recipe and true_str(custom_recipe.icon) then
|
if custom_recipe and true_str(custom_recipe.icon) then
|
||||||
icon = fmt("%s^\\[resize:16x16", custom_recipe.icon)
|
icon = custom_recipe.icon
|
||||||
elseif shapeless then
|
elseif shapeless then
|
||||||
icon = PNG.shapeless
|
icon = PNG.shapeless
|
||||||
end
|
end
|
||||||
|
@ -1460,8 +1460,7 @@ local function get_tabs_fs(fs, player, data, full_height)
|
||||||
if true_str(def.image) then
|
if true_str(def.image) then
|
||||||
local desc = translate(data.lang_code, def.description)
|
local desc = translate(data.lang_code, def.description)
|
||||||
fs("style_type[image;noclip=true]")
|
fs("style_type[image;noclip=true]")
|
||||||
fs("image", X + (tab_len / 2) - ((#desc * 0.1) / 2) - 0.55,
|
fs("image", X + (tab_len / 2) - ((#desc * 0.1) / 2) - 0.55, Y + 0.05, 0.35, 0.35, def.image)
|
||||||
Y + 0.05, 0.35, 0.35, fmt("%s^\\[resize:16x16", def.image))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
c++
|
c++
|
||||||
|
|
Ŝarĝante…
Reference in New Issue