From 24fdd07f56eff6589d8925cd15eda6ba1dc9276b Mon Sep 17 00:00:00 2001 From: Jean-Patrick Guerrero Date: Thu, 24 Dec 2020 23:12:38 +0100 Subject: [PATCH] Minor fix --- init.lua | 10 +++++++--- locale/craftguide.fr.tr | 2 +- locale/template | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 94bc260..5bce6dd 100644 --- a/init.lua +++ b/init.lua @@ -2286,7 +2286,7 @@ function craftguide.show(name, item, show_usages) if not recipes and not usages then if not recipes_cache[item] and not usages_cache[item] then return false, msg(name, sprintf("%s: %s", - S"No recipe or usage for this item", get_desc(item))) + S"No recipe or usage for this node", clr("#ff0", get_desc(item)))) end return false, msg(name, sprintf("%s: %s", @@ -2315,8 +2315,12 @@ register_command("craft", { local node = core.get_node(look_at) if node.name ~= "air" then - node_name = node.name - break + local def = reg_items[node.name] + + if def then + node_name = node.name + break + end end end diff --git a/locale/craftguide.fr.tr b/locale/craftguide.fr.tr index a4726f4..bb8fa82 100644 --- a/locale/craftguide.fr.tr +++ b/locale/craftguide.fr.tr @@ -53,7 +53,7 @@ Collect items to reveal more recipes=Collecte des items pour révéler plus de r Show recipe(s) of the pointed node=Affiche les recettes du bloc visé No node pointed=Aucun bloc visé You don't know a recipe or usage for this item=Vous ne connaissez aucune recette pour ce bloc -No recipe or usage for this item=Aucune recette pour ce bloc +No recipe or usage for this node=Aucune recette pour ce bloc Digging=Destruction Digging (by chance)=Destruction (par chance) @1 of chance to drop=@1 de chance de tomber diff --git a/locale/template b/locale/template index 1cf7bc5..75b51ba 100644 --- a/locale/template +++ b/locale/template @@ -53,7 +53,7 @@ Collect items to reveal more recipes= Show recipe(s) of the pointed node= No node pointed= You don't know a recipe or usage for this item= -No recipe or usage for this item= +No recipe or usage for this node= Digging= Digging (by chance)= @1 of chance to drop=