mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-17 22:09:34 +01:00
Craftguide: Squeeze shapeless recipes in 2×2 grid
This commit is contained in:
parent
c054915521
commit
6caf054dc8
1 changed files with 7 additions and 1 deletions
|
@ -108,7 +108,13 @@ function craftguide:get_recipe(iY, xoffset, tooltip, item, recipe_num, recipes)
|
|||
|
||||
local items = recipes[recipe_num].items
|
||||
local width = recipes[recipe_num].width
|
||||
if width == 0 then width = min(3, #items) end
|
||||
if width == 0 then
|
||||
if #items <= 4 then
|
||||
width = 2
|
||||
else
|
||||
width = min(3, #items)
|
||||
end
|
||||
end
|
||||
local rows = ceil(maxn(items) / width)
|
||||
local btn_size, craftgrid_limit = 1, 5
|
||||
|
||||
|
|
Loading…
Reference in a new issue