From d497205c9833315dc98628236157d5d39cbd4ae9 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 5 Jun 2017 22:47:50 +0200 Subject: [PATCH] Item name HUD: Show itemstring as fallback --- mods/HUD/mcl_item_names/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/HUD/mcl_item_names/init.lua b/mods/HUD/mcl_item_names/init.lua index 8916eb4130..7aa9721a28 100644 --- a/mods/HUD/mcl_item_names/init.lua +++ b/mods/HUD/mcl_item_names/init.lua @@ -40,7 +40,11 @@ minetest.register_globalstep(function(dtime) dtimes[player_name] = 0 if huds[player_name] then local def = minetest.registered_items[wstack] - local desc = def and def.description or "" + local desc = def and def.description + if not desc or desc == "" then + -- Use itemstring as fallback + desc = wstack + end -- Cut off item description after first newline local firstnewline = string.find(desc, "\n") if firstnewline then