From e8b979d5f34aa788666d7a879b32fb413d1fd10a Mon Sep 17 00:00:00 2001 From: Oversword Date: Sun, 19 Dec 2021 21:52:44 +0000 Subject: [PATCH] Log a warning when a craft has no width --- register.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/register.lua b/register.lua index 7f456da..8dc20f0 100644 --- a/register.lua +++ b/register.lua @@ -499,7 +499,15 @@ local function craftguide_craft(player, formname, fields) local alternate = ui.alternate[player_name] local craft = crafts[alternate] - if not craft.width or craft.width > 3 then return end + if not craft.width then + if not craft.output then + minetest.log("warning", "[unified_inventory] Craft has no output.") + else + minetest.log("warning", ("[unified_inventory] Craft for '%s' has no width."):format(craft.output)) + end + return + end + if craft.width > 3 then return end ui.craftguide_match_craft(player, "main", "craft", craft, amount)