Minor style cleaning

This commit is contained in:
JP Guerrero 2016-12-05 13:55:41 +01:00
parent 0c3287a415
commit e8508e1169

View File

@ -1,5 +1,5 @@
local craftguide, datas, npp = {}, {}, 8*3
local min, ceil, floor = math.min, math.ceil, math.floor
local min, ceil = math.min, math.ceil
local group_stereotypes = {
wool = "wool:white",
@ -84,7 +84,7 @@ function craftguide:get_formspec(player_name)
if data.recipe_num > #recipes then data.recipe_num = 1 end
if #recipes > 1 then formspec = formspec..
[[ button[0,6;1.6,1;alternate;Alternate]
[[ button[0,6;2,1;alternate;Alternate]
label[0,5.5;Recipe ]]..data.recipe_num.." of "..#recipes.."]"
end
@ -102,7 +102,7 @@ function craftguide:get_formspec(player_name)
for i, v in pairs(items) do
local X = (i-1) % width + 4.5
local Y = floor((i-1) / width + (6 - min(2, rows)))
local Y = ceil(i / width + (5 - min(2, rows)))
local groups = self:extract_groups(v)
local label = (groups and "\nG") or ""
local item = self:get_recipe(v)