mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-12-14 10:40:18 +01:00
Fix checking for big recipes
This commit is contained in:
parent
dc1ba8245e
commit
757e537ea4
2
init.lua
2
init.lua
@ -90,7 +90,7 @@ function craftguide:get_recipe(player_name, tooltip_l, item, recipe_num, recipes
|
|||||||
-- https://github.com/kilbith/xdecor/blob/master/handlers/helpers.lua#L1
|
-- https://github.com/kilbith/xdecor/blob/master/handlers/helpers.lua#L1
|
||||||
local rows = ceil(table.maxn(items) / width)
|
local rows = ceil(table.maxn(items) / width)
|
||||||
|
|
||||||
if width > 3 or rows > 3 then
|
if recipe_type == "normal" and width > 3 or rows > 3 then
|
||||||
formspec = formspec.."label["..(offset_X)..","..(iY+2)..
|
formspec = formspec.."label["..(offset_X)..","..(iY+2)..
|
||||||
";Recipe is too big to\nbe displayed ("..
|
";Recipe is too big to\nbe displayed ("..
|
||||||
width.."x"..rows..")]"
|
width.."x"..rows..")]"
|
||||||
|
Loading…
Reference in New Issue
Block a user