Fix cooktime tooltip

This commit is contained in:
pauloue 2018-11-18 18:24:32 +01:00 committed by Jean-Patrick Guerrero
parent ed861ea1b9
commit 6d3f8ce32a

@ -131,6 +131,7 @@ function craftguide:get_recipe(iX, iY, xoffset, recipe_num, recipes, show_usage)
(icon == "shapeless" and "^[transformFX" or "") .. "]" (icon == "shapeless" and "^[transformFX" or "") .. "]"
end end
local cooktime = width
if recipe_type == "cooking" then if recipe_type == "cooking" then
width = 1 width = 1
elseif width == 0 then elseif width == 0 then
@ -157,7 +158,7 @@ function craftguide:get_recipe(iX, iY, xoffset, recipe_num, recipes, show_usage)
local groups = extract_groups(v) local groups = extract_groups(v)
local label = groups and "\nG" or "" local label = groups and "\nG" or ""
local item_r = self:group_to_item(v) local item_r = self:group_to_item(v)
local tltip = self:get_tooltip(item_r, recipe_type, width, groups) local tltip = self:get_tooltip(item_r, recipe_type, cooktime, groups)
formspec = formspec .. formspec = formspec ..
"item_image_button[" .. X .. "," .. "item_image_button[" .. X .. "," ..