Skip to content
Snippets Groups Projects
Commit 3af915c6 authored by Jean-Patrick Guerrero's avatar Jean-Patrick Guerrero
Browse files

Small simplification

parent e213da64
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ end
function craftguide:get_formspec(stack, pagenum, item, recipe_num, filter, player_name)
local inv_size = datas[player_name].size
local npp, i, s = 8*3, 0, 0
local pagemax = math.floor((inv_size - 1) / npp + 1)
local pagemax = math.ceil(inv_size / npp)
if pagenum > pagemax then pagenum = 1
elseif pagenum == 0 then pagenum = pagemax end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment