From 40ee72f8beacc56f246731bde9259c42337cd4bd Mon Sep 17 00:00:00 2001 From: Michal Cieslakiewicz Date: Tue, 20 Aug 2019 10:01:05 +0200 Subject: [PATCH] minerchest: log when combination recipe is invalid. Minerchest accepts via API only combination recipes that are simple (one-type crafting) and reversible. If this condition cannot be fulfilled, be verbose and log a warning. Signed-off-by: Michal Cieslakiewicz --- minerchest/init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/minerchest/init.lua b/minerchest/init.lua index 8519bdd..867aa14 100644 --- a/minerchest/init.lua +++ b/minerchest/init.lua @@ -125,6 +125,8 @@ function minerchest.allow_item_combine(source_item, block_item) end end if not fis or not fib then + minetest.log("warning", "minerchest: no combination recipe for (\"" .. + sn .. "\", \"" .. bn.. "\") - skipping.") return false end -- verify if recipe is reversible @@ -150,6 +152,8 @@ function minerchest.allow_item_combine(source_item, block_item) end end if not isrev then + minetest.log("warning", "minerchest: combination recipe (\"" .. + sn .. "\", \"" .. bn.. "\") is not reversible - skipping.") return false end combdata[sn] = { items = fis, output = fib }