From 0f3f04f4f1ea02d5caaa68276cfb4496128270a5 Mon Sep 17 00:00:00 2001 From: kaadmy Date: Sun, 11 Oct 2015 12:30:48 -0700 Subject: [PATCH] fixed itemno bug in craft guid --- mods/craftingguide/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/craftingguide/init.lua b/mods/craftingguide/init.lua index c94441c..2f1a166 100644 --- a/mods/craftingguide/init.lua +++ b/mods/craftingguide/init.lua @@ -22,7 +22,7 @@ function craftingguide.get_formspec(name) form = form .. "label[0.41,1.74;"..user.itemno.."/"..#craftingguide.items[user.item].."]" -- itemno form = form .. "label[3.9,8.15;"..page.."/"..max_pages.."]" -- page form = form .. "label[4.4,2.5;"..user.item.."]" -- itemname - + local method = craftingguide.items[user.item][user.itemno].type if method == "normal" or method == "crafting" then form = form .. "image[4.25,1.5;1,1;craftingguide_method_crafting.png]" @@ -113,8 +113,8 @@ local function receive_fields(player, form_name, fields) local itemname = string.match(fieldname, "guide_item_(.*)") if itemname ~= nil then + itemno = 1 craftingguide.users[name].item = itemname - craftingguide.users[name].itemno = 1 end end