forked from minetest-mods/craftguide
Fix shapeless width bounds
This commit is contained in:
parent
727758b816
commit
08e758aca5
2
init.lua
2
init.lua
|
@ -458,7 +458,7 @@ local function get_recipe_fs(data)
|
||||||
elseif width == 0 then
|
elseif width == 0 then
|
||||||
shapeless = true
|
shapeless = true
|
||||||
local n = #recipe.items
|
local n = #recipe.items
|
||||||
width = n <= 4 and 2 or min(3, n)
|
width = (n < 5 and n > 1) and 2 or min(3, max(1, n))
|
||||||
end
|
end
|
||||||
|
|
||||||
local rows = ceil(maxn(recipe.items) / width)
|
local rows = ceil(maxn(recipe.items) / width)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user